Mercurial > emacs
changeset 9986:df605fcd1e75
(substitute-key-definition): Don't recursively scan
where OLDMAP has a submap but KEYMAP does not.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 16 Nov 1994 20:35:34 +0000 |
parents | 0a58678f81c6 |
children | 0a50658ec6f9 |
files | lisp/subr.el |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/subr.el Wed Nov 16 20:32:40 1994 +0000 +++ b/lisp/subr.el Wed Nov 16 20:35:34 1994 +0000 @@ -178,8 +178,11 @@ (setq inner-def (symbol-function inner-def))) (if (eq defn olddef) (define-key keymap prefix1 (nconc (nreverse skipped) newdef)) - ;; Avoid recursively rescanning a keymap being scanned. (if (and (keymapp defn) + ;; Avoid recursively scanning + ;; where KEYMAP does not have a submap. + (keymapp (lookup-key keymap prefix1)) + ;; Avoid recursively rescanning keymap being scanned. (not (memq inner-def key-substitution-in-progress))) ;; If this one isn't being scanned already, @@ -212,6 +215,7 @@ (define-key keymap prefix1 (nconc (nreverse skipped) newdef)) (if (and (keymapp defn) + (keymapp (lookup-key keymap prefix1)) (not (memq inner-def key-substitution-in-progress))) (substitute-key-definition olddef newdef keymap