Mercurial > emacs
changeset 7615:49176059d040
(substitute-key-definition): Skip cached menu key-equivs.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 22 May 1994 07:09:32 +0000 |
parents | 877b3aeaa9b5 |
children | b0098553bafe |
files | lisp/subr.el |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/subr.el Sun May 22 06:50:01 1994 +0000 +++ b/lisp/subr.el Sun May 22 07:09:32 1994 +0000 @@ -168,15 +168,22 @@ (while (stringp (car-safe defn)) (setq skipped (cons (car defn) skipped)) (setq defn (cdr defn))) + ;; Skip past cached key-equivalence data for menu items. + (and (consp defn) (consp (car defn)) + (setq defn (cdr defn))) (setq inner-def defn) + ;; Look past a symbol that names a keymap. (while (and (symbolp inner-def) (fboundp inner-def)) (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) (not (memq inner-def key-substitution-in-progress))) + ;; If this one isn't being scanned already, + ;; scan it now. (substitute-key-definition olddef newdef keymap inner-def prefix1))))) @@ -195,6 +202,8 @@ (while (stringp (car-safe defn)) (setq skipped (cons (car defn) skipped)) (setq defn (cdr defn))) + (and (consp defn) (consp (car defn)) + (setq defn (cdr defn))) (setq inner-def defn) (while (and (symbolp inner-def) (fboundp inner-def))