diff options
| author | Richard M. Stallman <rms@gnu.org> | 1994-02-19 00:01:46 +0000 |
|---|---|---|
| committer | Richard M. Stallman <rms@gnu.org> | 1994-02-19 00:01:46 +0000 |
| commit | 44d798af465ed1d3ca9ccd11d40199a196c77213 (patch) | |
| tree | 3c7e731ca15c33520bdfa5f9d760d3c024bf9be2 /lisp | |
| parent | 2eb9adabed31a8b90efcbc2ce62ae954a8b78a59 (diff) | |
| download | emacs-44d798af465ed1d3ca9ccd11d40199a196c77213.tar.gz | |
(substitute-key-definition): Don't discard menu strings.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/subr.el | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index 4a50dca95f3..ad5b50ccadf 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -152,16 +152,17 @@ in KEYMAP as NEWDEF those chars which are defined as OLDDEF in OLDMAP." ;; the inside of the following let that handles array elements. (aset vec1 0 char) (aset prefix1 (length prefix) char) - (let (inner-def) + (let (inner-def skipped) ;; Skip past menu-prompt. (while (stringp (car-safe defn)) + (setq skipped (cons (car defn) skipped)) (setq defn (cdr defn))) (setq inner-def defn) (while (and (symbolp inner-def) (fboundp inner-def)) (setq inner-def (symbol-function inner-def))) (if (eq defn olddef) - (define-key keymap prefix1 newdef) + (define-key keymap prefix1 (nconc (nreverse skipped) newdef)) (if (keymapp defn) (substitute-key-definition olddef newdef keymap inner-def @@ -176,16 +177,18 @@ in KEYMAP as NEWDEF those chars which are defined as OLDDEF in OLDMAP." ;; the inside of the previous let. (aset vec1 0 char) (aset prefix1 (length prefix) char) - (let (inner-def) + (let (inner-def skipped) ;; Skip past menu-prompt. (while (stringp (car-safe defn)) + (setq skipped (cons (car defn) skipped)) (setq defn (cdr defn))) (setq inner-def defn) (while (and (symbolp inner-def) (fboundp inner-def)) (setq inner-def (symbol-function inner-def))) (if (eq defn olddef) - (define-key keymap prefix1 newdef) + (define-key keymap prefix1 + (nconc (nreverse skipped) newdef)) (if (keymapp defn) (substitute-key-definition olddef newdef keymap inner-def |
