help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

define-key and functions


From: Bill Rising
Subject: define-key and functions
Date: Sat, 06 Dec 2003 17:49:11 GMT
User-agent: MT-NewsWatcher/3.2 (PPC Mac OS X)

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]