aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2002-02-23 23:42:31 +0000
committerKim F. Storm2002-02-23 23:42:31 +0000
commita8959ac2a3b122f064c0aa575404c8a02b4ff74d (patch)
treea554272ac813e2b8b6e066b013dbbd92f46eb0ff
parentea136e8db6fa70ac0c88459cf6e577cb11c02bc8 (diff)
downloademacs-a8959ac2a3b122f064c0aa575404c8a02b4ff74d.tar.gz
emacs-a8959ac2a3b122f064c0aa575404c8a02b4ff74d.zip
Modify description of command remapping which now uses a `remap'
prefix-key.
-rw-r--r--etc/NEWS22
1 files changed, 9 insertions, 13 deletions
diff --git a/etc/NEWS b/etc/NEWS
index c9d9aefb53b..577a06cf7a3 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -531,8 +531,8 @@ command remapping allows you to directly map kill-line into
531my-kill-line and kill-word into my-kill-word through the minor mode 531my-kill-line and kill-word into my-kill-word through the minor mode
532map using define-key: 532map using define-key:
533 533
534 (define-key my-mode-map 'kill-line 'my-kill-line) 534 (define-key my-mode-map [remap kill-line] 'my-kill-line)
535 (define-key my-mode-map 'kill-word 'my-kill-word) 535 (define-key my-mode-map [remap kill-word] 'my-kill-word)
536 536
537Now, when my-mode is enabled, and the user enters C-k or M-d, 537Now, when my-mode is enabled, and the user enters C-k or M-d,
538the commands my-kill-line and my-kill-word are run. 538the commands my-kill-line and my-kill-word are run.
@@ -543,20 +543,16 @@ then C-k still runs my-kill-line.
543 543
544The following changes have been made to provide command remapping: 544The following changes have been made to provide command remapping:
545 545
546- define-key now accepts a command name as the KEY argument. 546- Command remappings are defined using `define-key' with a prefix-key
547 This identifies the command to be remapped in the specified keymap. 547 `remap', i.e. `(define-key MAP [remap CMD] DEF)' remaps command CMD
548 This is equivalent to specifying the command name as the only 548 to definition DEF in keymap MAP. The definition is not limited to
549 element of a vector, e.g [kill-line], except that when KEY is a 549 another command; it can be anything accepted for a normal binding.
550 symbol, the DEF argument must also be a symbol.
551 550
552- In calls from Lisp, global-set-key, global-unset-key, local-set-key, 551- The new function `remap-command' returns the binding for a remapped
553 and local-unset-key also accept a command name as the KEY argument. 552 command in the current keymaps, or nil if it isn't remapped.
554 553
555- key-binding now remaps interactive commands unless the optional 554- key-binding now remaps interactive commands unless the optional
556 third argument NO-REMAP is non-nil. It also accepts a command name 555 third argument NO-REMAP is non-nil.
557 as the KEY argument.
558
559- lookup-key now accepts a command name as the KEY argument.
560 556
561- where-is-internal now returns nil for a remapped command (e.g. 557- where-is-internal now returns nil for a remapped command (e.g.
562 kill-line if my-mode is enabled), and the actual key binding for 558 kill-line if my-mode is enabled), and the actual key binding for