diff options
| author | Richard M. Stallman | 2006-02-08 00:26:37 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2006-02-08 00:26:37 +0000 |
| commit | 91055930f5260b0d5e36e8512f209b9cc211c8b8 (patch) | |
| tree | 7c9a9c8c9de79748b3d4a537ab8c4a5d90759987 | |
| parent | 5a579270ae0be63d881ffa9d93f1ba4fc41aa039 (diff) | |
| download | emacs-91055930f5260b0d5e36e8512f209b9cc211c8b8.tar.gz emacs-91055930f5260b0d5e36e8512f209b9cc211c8b8.zip | |
(Key Lookup): Clarify wrt commands vs other functions.
(Changing Key Bindings): Clarify when remapping is better than
substitute-key-definition.
| -rw-r--r-- | lispref/keymaps.texi | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lispref/keymaps.texi b/lispref/keymaps.texi index f73f8d3b7a4..b7bc34ece84 100644 --- a/lispref/keymaps.texi +++ b/lispref/keymaps.texi | |||
| @@ -933,8 +933,10 @@ is a keymap, and is treated as a keymap (see above). | |||
| 933 | @item | 933 | @item |
| 934 | @cindex @code{lambda} in keymap | 934 | @cindex @code{lambda} in keymap |
| 935 | If the @sc{car} of @var{list} is @code{lambda}, then the list is a | 935 | If the @sc{car} of @var{list} is @code{lambda}, then the list is a |
| 936 | lambda expression. This is presumed to be a command, and is treated as | 936 | lambda expression. This is presumed to be a function, and is treated |
| 937 | such (see above). | 937 | as such (see above). In order to execute properly as a key binding, |
| 938 | this function must be a command---it must have an @code{interactive} | ||
| 939 | specification. @xref{Defining Commands}. | ||
| 938 | 940 | ||
| 939 | @item | 941 | @item |
| 940 | If the @sc{car} of @var{list} is a keymap and the @sc{cdr} is an event | 942 | If the @sc{car} of @var{list} is a keymap and the @sc{cdr} is an event |
| @@ -1282,9 +1284,9 @@ default global map. | |||
| 1282 | 1284 | ||
| 1283 | The function @code{substitute-key-definition} scans a keymap for | 1285 | The function @code{substitute-key-definition} scans a keymap for |
| 1284 | keys that have a certain binding and rebinds them with a different | 1286 | keys that have a certain binding and rebinds them with a different |
| 1285 | binding. Another feature you can use for similar effects, but which | 1287 | binding. Another feature which is cleaner and can often produce the |
| 1286 | is often cleaner, is to add a binding that remaps a command | 1288 | same results to remap one command into another (@pxref{Remapping |
| 1287 | (@pxref{Remapping Commands}). | 1289 | Commands}). |
| 1288 | 1290 | ||
| 1289 | @defun substitute-key-definition olddef newdef keymap &optional oldmap | 1291 | @defun substitute-key-definition olddef newdef keymap &optional oldmap |
| 1290 | @cindex replace bindings | 1292 | @cindex replace bindings |