comparison lisp/subr.el @ 57438:0326440c511a

(substitute-key-definition): Mention command remapping in doc string.
author Kim F. Storm <storm@cua.dk>
date Mon, 11 Oct 2004 22:02:16 +0000
parents 601c087f45f6
children db7d00351c33 47f53c5c9620
comparison
equal deleted inserted replaced
57437:8fb43e06b64f 57438:0326440c511a
381 381
382 (defun substitute-key-definition (olddef newdef keymap &optional oldmap prefix) 382 (defun substitute-key-definition (olddef newdef keymap &optional oldmap prefix)
383 "Replace OLDDEF with NEWDEF for any keys in KEYMAP now defined as OLDDEF. 383 "Replace OLDDEF with NEWDEF for any keys in KEYMAP now defined as OLDDEF.
384 In other words, OLDDEF is replaced with NEWDEF where ever it appears. 384 In other words, OLDDEF is replaced with NEWDEF where ever it appears.
385 Alternatively, if optional fourth argument OLDMAP is specified, we redefine 385 Alternatively, if optional fourth argument OLDMAP is specified, we redefine
386 in KEYMAP as NEWDEF those keys which are defined as OLDDEF in OLDMAP." 386 in KEYMAP as NEWDEF those keys which are defined as OLDDEF in OLDMAP.
387
388 For most uses, it is simpler and safer to use command remappping like this:
389 \(define-key KEYMAP [remap OLDDEF] NEWDEF)"
387 ;; Don't document PREFIX in the doc string because we don't want to 390 ;; Don't document PREFIX in the doc string because we don't want to
388 ;; advertise it. It's meant for recursive calls only. Here's its 391 ;; advertise it. It's meant for recursive calls only. Here's its
389 ;; meaning 392 ;; meaning
390 393
391 ;; If optional argument PREFIX is specified, it should be a key 394 ;; If optional argument PREFIX is specified, it should be a key