From: Richard M. Stallman Date: Mon, 10 Jun 1996 18:19:25 +0000 (+0000) Subject: (fix_submap_inheritance): If parent_entry is not a keymap, use nil instead. X-Git-Tag: emacs-19.34~484 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3393c3f5d34734cbf95b1a874180855ee2027c93;p=emacs.git (fix_submap_inheritance): If parent_entry is not a keymap, use nil instead. --- diff --git a/src/keymap.c b/src/keymap.c index bb141e84e6c..a0c28bb0782 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -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); }