/[emacs]/emacs/etc/NEWS
ViewVC logotype

Diff of /emacs/etc/NEWS

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.611 by walters, Sat Feb 23 21:35:06 2002 UTC revision 1.612 by kfstorm, Sat Feb 23 23:42:31 2002 UTC
# Line 531  command remapping allows you to directly Line 531  command remapping allows you to directly
531  my-kill-line and kill-word into my-kill-word through the minor mode  my-kill-line and kill-word into my-kill-word through the minor mode
532  map using define-key:  map using define-key:
533    
534     (define-key my-mode-map 'kill-line 'my-kill-line)     (define-key my-mode-map [remap kill-line] 'my-kill-line)
535     (define-key my-mode-map 'kill-word 'my-kill-word)     (define-key my-mode-map [remap kill-word] 'my-kill-word)
536    
537  Now, when my-mode is enabled, and the user enters C-k or M-d,  Now, when my-mode is enabled, and the user enters C-k or M-d,
538  the commands my-kill-line and my-kill-word are run.  the commands my-kill-line and my-kill-word are run.
# Line 543  then C-k still runs my-kill-line. Line 543  then C-k still runs my-kill-line.
543    
544  The following changes have been made to provide command remapping:  The following changes have been made to provide command remapping:
545    
546  - define-key now accepts a command name as the KEY argument.  - Command remappings are defined using `define-key' with a prefix-key
547    This identifies the command to be remapped in the specified keymap.    `remap', i.e. `(define-key MAP [remap CMD] DEF)' remaps command CMD
548    This is equivalent to specifying the command name as the only    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    another command; it can be anything accepted for a normal binding.
   symbol, the DEF argument must also be a symbol.  
550    
551  - In calls from Lisp, global-set-key, global-unset-key, local-set-key,  - The new function `remap-command' returns the binding for a remapped
552    and local-unset-key also accept a command name as the KEY argument.    command in the current keymaps, or nil if it isn't remapped.
553    
554  - key-binding now remaps interactive commands unless the optional  - key-binding now remaps interactive commands unless the optional
555    third argument NO-REMAP is non-nil.  It also accepts a command name    third argument NO-REMAP is non-nil.
   as the KEY argument.  
   
 - lookup-key now accepts a command name as the KEY argument.  
556    
557  - where-is-internal now returns nil for a remapped command (e.g.  - where-is-internal now returns nil for a remapped command (e.g.
558    kill-line if my-mode is enabled), and the actual key binding for    kill-line if my-mode is enabled), and the actual key binding for

Legend:
Removed from v.1.611  
changed lines
  Added in v.1.612

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26