diff options
Diffstat (limited to 'src/keymap.c')
-rw-r--r-- | src/keymap.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/keymap.c b/src/keymap.c index c8b01eed6fd..2b77a7fc444 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -2596,7 +2596,10 @@ The optional 5th arg NO-REMAP alters how command remapping is handled: - If DEFINITION is remapped to OTHER-COMMAND, normally return the bindings for OTHER-COMMAND. But if NO-REMAP is non-nil, return the - bindings for DEFINITION instead, ignoring its remapping. */) + bindings for DEFINITION instead, ignoring its remapping. + +Keys that are represented as events that have a `non-key-event' non-nil +symbol property are ignored. */) (Lisp_Object definition, Lisp_Object keymap, Lisp_Object firstonly, Lisp_Object noindirect, Lisp_Object no_remap) { /* The keymaps in which to search. */ @@ -2720,7 +2723,12 @@ The optional 5th arg NO-REMAP alters how command remapping is handled: /* It is a true unshadowed match. Record it, unless it's already been seen (as could happen when inheriting keymaps). */ - if (NILP (Fmember (sequence, found))) + if (NILP (Fmember (sequence, found)) + /* Filter out non key events. */ + && !(VECTORP (sequence) + && ASIZE (sequence) == 1 + && SYMBOLP (AREF (sequence, 0)) + && !NILP (Fget (AREF (sequence, 0), Qnon_key_event)))) found = Fcons (sequence, found); /* If firstonly is Qnon_ascii, then we can return the first @@ -3461,4 +3469,6 @@ that describe key bindings. That is why the default is nil. */); DEFSYM (Qkey_parse, "key-parse"); DEFSYM (Qkey_valid_p, "key-valid-p"); + + DEFSYM (Qnon_key_event, "non-key-event"); } |