]> git.eshelyaron.com Git - emacs.git/commitdiff
(fix_submap_inheritance): If parent_entry is not a keymap, use nil instead.
authorRichard M. Stallman <rms@gnu.org>
Mon, 10 Jun 1996 18:19:25 +0000 (18:19 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 10 Jun 1996 18:19:25 +0000 (18:19 +0000)
src/keymap.c

index bb141e84e6cf5a7a958fa04abf8d01c5a1b37d7f..a0c28bb078255fa3ceaee860972ea6d95715b760 100644 (file)
@@ -379,6 +379,11 @@ fix_submap_inheritance (map, event, submap)
   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);
 }