summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-03-22 03:55:21 +0000
committerRichard M. Stallman <rms@gnu.org>1997-03-22 03:55:21 +0000
commit31672d441203f9120d2f7428b2071070c74131e5 (patch)
tree4fcacb2b756220566e359919bc7dd6dcd97f5883 /lisp
parentc6e44e65c9c5a1f3ae624b9f22bdae23febfab5d (diff)
downloademacs-31672d441203f9120d2f7428b2071070c74131e5.tar.gz
(substitute-key-definition):
Compare with equal if definition is a key sequence.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/subr.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 3f215b1970d..a498cea5b37 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -125,7 +125,11 @@ in KEYMAP as NEWDEF those chars which are defined as OLDDEF in OLDMAP."
(while (and (symbolp inner-def)
(fboundp inner-def))
(setq inner-def (symbol-function inner-def)))
- (if (eq defn olddef)
+ (if (or (eq defn olddef)
+ ;; Compare with equal if definition is a key sequence.
+ ;; That is useful for operating on function-key-map.
+ (and (or (stringp defn) (vectorp defn))
+ (equal defn olddef)))
(define-key keymap prefix1 (nconc (nreverse skipped) newdef))
(if (and (keymapp defn)
;; Avoid recursively scanning
@@ -162,7 +166,9 @@ in KEYMAP as NEWDEF those chars which are defined as OLDDEF in OLDMAP."
(while (and (symbolp inner-def)
(fboundp inner-def))
(setq inner-def (symbol-function inner-def)))
- (if (eq defn olddef)
+ (if (or (eq defn olddef)
+ (and (or (stringp defn) (vectorp defn))
+ (equal defn olddef)))
(define-key keymap prefix1
(nconc (nreverse skipped) newdef))
(if (and (keymapp defn)