changeset 13039:04ffbdd37d2d

(substitute-key-definition): Do recursively scan where KEYMAP has nothing at all.
author Richard M. Stallman <rms@gnu.org>
date Mon, 18 Sep 1995 14:45:44 +0000
parents d07703594662
children 169d50e2ee4c
files lisp/subr.el
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/subr.el	Mon Sep 18 14:15:22 1995 +0000
+++ b/lisp/subr.el	Mon Sep 18 14:45:44 1995 +0000
@@ -129,7 +129,9 @@
 		(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 @@
 			(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