diff options
Diffstat (limited to 'src/keyboard.c')
| -rw-r--r-- | src/keyboard.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index a21008b9502..f06c8794a54 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -8918,6 +8918,14 @@ keyremap_step (Lisp_Object *keybuf, int bufsize, volatile keyremap *fkey, | |||
| 8918 | return 0; | 8918 | return 0; |
| 8919 | } | 8919 | } |
| 8920 | 8920 | ||
| 8921 | static int | ||
| 8922 | test_undefined (Lisp_Object binding) | ||
| 8923 | { | ||
| 8924 | return (EQ (binding, Qundefined) | ||
| 8925 | || (!NILP (binding) && SYMBOLP (binding) | ||
| 8926 | && EQ (Fcommand_remapping (binding, Qnil, Qnil), Qundefined))); | ||
| 8927 | } | ||
| 8928 | |||
| 8921 | /* Read a sequence of keys that ends with a non prefix character, | 8929 | /* Read a sequence of keys that ends with a non prefix character, |
| 8922 | storing it in KEYBUF, a buffer of size BUFSIZE. | 8930 | storing it in KEYBUF, a buffer of size BUFSIZE. |
| 8923 | Prompt with PROMPT. | 8931 | Prompt with PROMPT. |
| @@ -9868,7 +9876,9 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, | |||
| 9868 | } | 9876 | } |
| 9869 | } | 9877 | } |
| 9870 | 9878 | ||
| 9871 | if (first_binding < nmaps && NILP (submaps[first_binding]) | 9879 | if (first_binding < nmaps |
| 9880 | && NILP (submaps[first_binding]) | ||
| 9881 | && !test_undefined (defs[first_binding]) | ||
| 9872 | && indec.start >= t) | 9882 | && indec.start >= t) |
| 9873 | /* There is a binding and it's not a prefix. | 9883 | /* There is a binding and it's not a prefix. |
| 9874 | (and it doesn't have any input-decode-map translation pending). | 9884 | (and it doesn't have any input-decode-map translation pending). |
| @@ -9895,7 +9905,9 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, | |||
| 9895 | /* If there's a binding (i.e. | 9905 | /* If there's a binding (i.e. |
| 9896 | first_binding >= nmaps) we don't want | 9906 | first_binding >= nmaps) we don't want |
| 9897 | to apply this function-key-mapping. */ | 9907 | to apply this function-key-mapping. */ |
| 9898 | fkey.end + 1 == t && first_binding >= nmaps, | 9908 | fkey.end + 1 == t |
| 9909 | && (first_binding >= nmaps | ||
| 9910 | || test_undefined (defs[first_binding])), | ||
| 9899 | &diff, prompt); | 9911 | &diff, prompt); |
| 9900 | UNGCPRO; | 9912 | UNGCPRO; |
| 9901 | if (done) | 9913 | if (done) |