diff options
| author | Richard M. Stallman | 1996-06-10 18:19:25 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-06-10 18:19:25 +0000 |
| commit | 3393c3f5d34734cbf95b1a874180855ee2027c93 (patch) | |
| tree | ed0693f0c1a79cb422ccc7fc7d2a9f9fbf7c1f60 /src | |
| parent | 7830e24b1e974f802e494928a76798a108b14899 (diff) | |
| download | emacs-3393c3f5d34734cbf95b1a874180855ee2027c93.tar.gz emacs-3393c3f5d34734cbf95b1a874180855ee2027c93.zip | |
(fix_submap_inheritance): If parent_entry is not a keymap, use nil instead.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keymap.c | 5 |
1 files changed, 5 insertions, 0 deletions
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) | |||
| 379 | else | 379 | else |
| 380 | parent_entry = Qnil; | 380 | parent_entry = Qnil; |
| 381 | 381 | ||
| 382 | /* If MAP's parent has something other than a keymap, | ||
| 383 | our own submap shadows it completely, so use nil as SUBMAP's parent. */ | ||
| 384 | if (! (CONSP (parent_entry) && EQ (XCONS (parent_entry)->car, Qkeymap))) | ||
| 385 | parent_entry = Qnil; | ||
| 386 | |||
| 382 | if (! EQ (parent_entry, submap)) | 387 | if (! EQ (parent_entry, submap)) |
| 383 | Fset_keymap_parent (submap, parent_entry); | 388 | Fset_keymap_parent (submap, parent_entry); |
| 384 | } | 389 | } |