From 3393c3f5d34734cbf95b1a874180855ee2027c93 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 10 Jun 1996 18:19:25 +0000 Subject: [PATCH] (fix_submap_inheritance): If parent_entry is not a keymap, use nil instead. --- src/keymap.c | 5 +++++ 1 file changed, 5 insertions(+) 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); } -- 2.39.2