diff options
Diffstat (limited to 'src')
| -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: | |||
| 2596 | 2596 | ||
| 2597 | - If DEFINITION is remapped to OTHER-COMMAND, normally return the | 2597 | - If DEFINITION is remapped to OTHER-COMMAND, normally return the |
| 2598 | bindings for OTHER-COMMAND. But if NO-REMAP is non-nil, return the | 2598 | bindings for OTHER-COMMAND. But if NO-REMAP is non-nil, return the |
| 2599 | bindings for DEFINITION instead, ignoring its remapping. */) | 2599 | bindings for DEFINITION instead, ignoring its remapping. |
| 2600 | |||
| 2601 | Keys that are represented as events that have a `non-key-event' non-nil | ||
| 2602 | symbol property are ignored. */) | ||
| 2600 | (Lisp_Object definition, Lisp_Object keymap, Lisp_Object firstonly, Lisp_Object noindirect, Lisp_Object no_remap) | 2603 | (Lisp_Object definition, Lisp_Object keymap, Lisp_Object firstonly, Lisp_Object noindirect, Lisp_Object no_remap) |
| 2601 | { | 2604 | { |
| 2602 | /* The keymaps in which to search. */ | 2605 | /* The keymaps in which to search. */ |
| @@ -2720,7 +2723,12 @@ The optional 5th arg NO-REMAP alters how command remapping is handled: | |||
| 2720 | 2723 | ||
| 2721 | /* It is a true unshadowed match. Record it, unless it's already | 2724 | /* It is a true unshadowed match. Record it, unless it's already |
| 2722 | been seen (as could happen when inheriting keymaps). */ | 2725 | been seen (as could happen when inheriting keymaps). */ |
| 2723 | if (NILP (Fmember (sequence, found))) | 2726 | if (NILP (Fmember (sequence, found)) |
| 2727 | /* Filter out non key events. */ | ||
| 2728 | && !(VECTORP (sequence) | ||
| 2729 | && ASIZE (sequence) == 1 | ||
| 2730 | && SYMBOLP (AREF (sequence, 0)) | ||
| 2731 | && !NILP (Fget (AREF (sequence, 0), Qnon_key_event)))) | ||
| 2724 | found = Fcons (sequence, found); | 2732 | found = Fcons (sequence, found); |
| 2725 | 2733 | ||
| 2726 | /* If firstonly is Qnon_ascii, then we can return the first | 2734 | /* 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. */); | |||
| 3461 | 3469 | ||
| 3462 | DEFSYM (Qkey_parse, "key-parse"); | 3470 | DEFSYM (Qkey_parse, "key-parse"); |
| 3463 | DEFSYM (Qkey_valid_p, "key-valid-p"); | 3471 | DEFSYM (Qkey_valid_p, "key-valid-p"); |
| 3472 | |||
| 3473 | DEFSYM (Qnon_key_event, "non-key-event"); | ||
| 3464 | } | 3474 | } |