]> git.eshelyaron.com Git - emacs.git/commitdiff
(substitute-key-definition): Do recursively scan
authorRichard M. Stallman <rms@gnu.org>
Mon, 18 Sep 1995 14:45:44 +0000 (14:45 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 18 Sep 1995 14:45:44 +0000 (14:45 +0000)
where KEYMAP has nothing at all.

lisp/subr.el

index 970ba2ee4f67ffe9bb2e917ca6fd594e0829df73..fdf189c68511d927cd2893d2a8f42782a8973fcb 100644 (file)
@@ -129,7 +129,9 @@ in KEYMAP as NEWDEF those chars which are defined as OLDDEF in OLDMAP."
                (if (and (keymapp defn)
                         ;; Avoid recursively scanning
                         ;; where KEYMAP does not have a submap.
-                        (keymapp (lookup-key keymap prefix1))
+                        (let ((elt (lookup-key keymap prefix1)))
+                          (or (null elt)
+                              (keymapp elt)))
                         ;; Avoid recursively rescanning keymap being scanned.
                         (not (memq inner-def
                                    key-substitution-in-progress)))
@@ -163,7 +165,9 @@ in KEYMAP as NEWDEF those chars which are defined as OLDDEF in OLDMAP."
                        (define-key keymap prefix1
                          (nconc (nreverse skipped) newdef))
                      (if (and (keymapp defn)
-                              (keymapp (lookup-key keymap prefix1))
+                              (let ((elt (lookup-key keymap prefix1)))
+                                (or (null elt)
+                                    (keymapp elt)))
                               (not (memq inner-def
                                          key-substitution-in-progress)))
                          (substitute-key-definition olddef newdef keymap