Mercurial > emacs
comparison src/keymap.c @ 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 | 82615c826910 |
children | dd639432a55a |
comparison
equal
deleted
inserted
replaced
15377:65d9ff2c8602 | 15378:ecfc288350ab |
---|---|
375 | 375 |
376 map_parent = Fkeymap_parent (map); | 376 map_parent = Fkeymap_parent (map); |
377 if (! NILP (map_parent)) | 377 if (! NILP (map_parent)) |
378 parent_entry = access_keymap (map_parent, event, 0, 0); | 378 parent_entry = access_keymap (map_parent, event, 0, 0); |
379 else | 379 else |
380 parent_entry = Qnil; | |
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))) | |
380 parent_entry = Qnil; | 385 parent_entry = Qnil; |
381 | 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 } |