unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* define-key and functions
@ 2003-12-06 17:49 Bill Rising
  2003-12-06 19:06 ` François Fleuret
  2003-12-06 19:15 ` Fredrik Arnerup
  0 siblings, 2 replies; 4+ messages in thread
From: Bill Rising @ 2003-12-06 17:49 UTC (permalink / raw)


Hello wizards,

Is there a way to use a function which takes arguments in define-key?

For instance:
(define-key global-map "C-m" 'foo-new-line)
runs the command foo-new-line if C-m is pressed.

Is there a way to pass an argument to foo-new-line?

I've read the define-key documentation, looked in a bunch of mode 
definitions and surfed the web looking at folks .emacs files, but I've 
not seen a way to pass an argument.

The real problem is that I would like to use a universal toggling 
program and simply pass the name of the variable to be toggled from some 
menu definitions. Perhaps I'm going about the problem in an entirely bad 
fashion.

Any help would be appreciated.

Bill

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-12-06 19:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-06 17:49 define-key and functions Bill Rising
2003-12-06 19:06 ` François Fleuret
2003-12-06 19:15 ` Fredrik Arnerup
2003-12-06 19:19   ` Bill Rising

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).