# HG changeset patch # User Richard M. Stallman # Date 859002921 0 # Node ID 21e3f467224e6a9a7b6cc55cf358d3652f55c7ee # Parent 15e868121a15751124d02ab8723e12ecbedac778 (substitute-key-definition): Compare with equal if definition is a key sequence. diff -r 15e868121a15 -r 21e3f467224e lisp/subr.el --- a/lisp/subr.el Sat Mar 22 03:54:14 1997 +0000 +++ b/lisp/subr.el Sat Mar 22 03:55:21 1997 +0000 @@ -125,7 +125,11 @@ (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 @@ (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)