changeset 15378:ecfc288350ab

(fix_submap_inheritance): If parent_entry is not a keymap, use nil instead.
author Richard M. Stallman <rms@gnu.org>
date Mon, 10 Jun 1996 18:19:25 +0000
parents 65d9ff2c8602
children 5cd52d4838f8
files src/keymap.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/keymap.c	Mon Jun 10 17:35:37 1996 +0000
+++ b/src/keymap.c	Mon Jun 10 18:19:25 1996 +0000
@@ -379,6 +379,11 @@
   else
     parent_entry = Qnil;
 
+  /* If MAP's parent has something other than a keymap,
+     our own submap shadows it completely, so use nil as SUBMAP's parent.  */
+  if (! (CONSP (parent_entry) && EQ (XCONS (parent_entry)->car, Qkeymap)))
+    parent_entry = Qnil;
+
   if (! EQ (parent_entry, submap))
     Fset_keymap_parent (submap, parent_entry);
 }