diff options
| author | Eli Zaretskii | 2016-03-26 11:52:12 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2016-03-26 11:52:12 +0300 |
| commit | cf40f389cfbcb8dc4f2a880aa2a5aa38b394293c (patch) | |
| tree | e71da9a7af3501c2387b30b5c413300c5e27f3a8 /src/keyboard.c | |
| parent | 8ee4c52abc98e6522d812a29cfe57ffbdeb98144 (diff) | |
| download | emacs-cf40f389cfbcb8dc4f2a880aa2a5aa38b394293c.tar.gz emacs-cf40f389cfbcb8dc4f2a880aa2a5aa38b394293c.zip | |
Ignore non-nil. non-cons values of unread-command-events
* src/keyboard.c (requeued_events_pending_p, read_char)
(Finput_pending_p): Use CONSP instead of !NILP to see if there are
unread command events to be processed. (Bug#22976)
Diffstat (limited to 'src/keyboard.c')
| -rw-r--r-- | src/keyboard.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 53030e22c75..9618e38e575 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -2529,7 +2529,7 @@ read_char (int commandflag, Lisp_Object map, | |||
| 2529 | if (KEYMAPP (map) && INTERACTIVE | 2529 | if (KEYMAPP (map) && INTERACTIVE |
| 2530 | && !NILP (prev_event) && ! EVENT_HAS_PARAMETERS (prev_event) | 2530 | && !NILP (prev_event) && ! EVENT_HAS_PARAMETERS (prev_event) |
| 2531 | /* Don't bring up a menu if we already have another event. */ | 2531 | /* Don't bring up a menu if we already have another event. */ |
| 2532 | && NILP (Vunread_command_events) | 2532 | && !CONSP (Vunread_command_events) |
| 2533 | && !detect_input_pending_run_timers (0)) | 2533 | && !detect_input_pending_run_timers (0)) |
| 2534 | { | 2534 | { |
| 2535 | c = read_char_minibuf_menu_prompt (commandflag, map); | 2535 | c = read_char_minibuf_menu_prompt (commandflag, map); |
| @@ -2660,7 +2660,7 @@ read_char (int commandflag, Lisp_Object map, | |||
| 2660 | && !EQ (XCAR (prev_event), Qmenu_bar) | 2660 | && !EQ (XCAR (prev_event), Qmenu_bar) |
| 2661 | && !EQ (XCAR (prev_event), Qtool_bar) | 2661 | && !EQ (XCAR (prev_event), Qtool_bar) |
| 2662 | /* Don't bring up a menu if we already have another event. */ | 2662 | /* Don't bring up a menu if we already have another event. */ |
| 2663 | && NILP (Vunread_command_events)) | 2663 | && !CONSP (Vunread_command_events)) |
| 2664 | { | 2664 | { |
| 2665 | c = read_char_x_menu_prompt (map, prev_event, used_mouse_menu); | 2665 | c = read_char_x_menu_prompt (map, prev_event, used_mouse_menu); |
| 2666 | 2666 | ||
| @@ -9878,7 +9878,7 @@ clear_input_pending (void) | |||
| 9878 | bool | 9878 | bool |
| 9879 | requeued_events_pending_p (void) | 9879 | requeued_events_pending_p (void) |
| 9880 | { | 9880 | { |
| 9881 | return (!NILP (Vunread_command_events)); | 9881 | return (CONSP (Vunread_command_events)); |
| 9882 | } | 9882 | } |
| 9883 | 9883 | ||
| 9884 | DEFUN ("input-pending-p", Finput_pending_p, Sinput_pending_p, 0, 1, 0, | 9884 | DEFUN ("input-pending-p", Finput_pending_p, Sinput_pending_p, 0, 1, 0, |
| @@ -9889,7 +9889,7 @@ if there is a doubt, the value is t. | |||
| 9889 | If CHECK-TIMERS is non-nil, timers that are ready to run will do so. */) | 9889 | If CHECK-TIMERS is non-nil, timers that are ready to run will do so. */) |
| 9890 | (Lisp_Object check_timers) | 9890 | (Lisp_Object check_timers) |
| 9891 | { | 9891 | { |
| 9892 | if (!NILP (Vunread_command_events) | 9892 | if (CONSP (Vunread_command_events) |
| 9893 | || !NILP (Vunread_post_input_method_events) | 9893 | || !NILP (Vunread_post_input_method_events) |
| 9894 | || !NILP (Vunread_input_method_events)) | 9894 | || !NILP (Vunread_input_method_events)) |
| 9895 | return (Qt); | 9895 | return (Qt); |