diff options
author | Richard M. Stallman <[email protected]> | 1997-06-13 00:46:33 +0000 |
---|---|---|
committer | Richard M. Stallman <[email protected]> | 1997-06-13 00:46:33 +0000 |
commit | 303b5b3f0f2de500d03eb347ab09a79214bc3ace (patch) | |
tree | 078e46af5c07fa4dee10d20f6b287a16bd776c2a /src | |
parent | 69645afc5310cb5cad6fc6769de55e9102ffaaa9 (diff) |
(kbd_buffer_get_event): When wait_reading_process_input
returns, check Vunread_command_events.
Diffstat (limited to 'src')
-rw-r--r-- | src/keyboard.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 8a89ce917a..50f20d639f 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1885,7 +1885,8 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) restore_getcjmp (local_getcjmp); tem0 = sit_for (echo_keystrokes, 0, 1, 1, 0); restore_getcjmp (save_jump); - if (EQ (tem0, Qt)) + if (EQ (tem0, Qt) + && ! CONSP (Vunread_command_events)) echo_now (); } } @@ -1955,7 +1956,8 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) 0, 1, 1, 0); restore_getcjmp (save_jump); - if (EQ (tem0, Qt)) + if (EQ (tem0, Qt) + && ! CONSP (Vunread_command_events)) { Fdo_auto_save (Qnil, Qnil); @@ -1971,6 +1973,14 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) } } + /* If this has become non-nil here, it has been set by a timer + or sentinel or filter. */ + if (CONSP (Vunread_command_events)) + { + c = XCONS (Vunread_command_events)->car; + Vunread_command_events = XCONS (Vunread_command_events)->cdr; + } + /* Read something from current KBOARD's side queue, if possible. */ if (NILP (c)) @@ -2668,6 +2678,15 @@ kbd_buffer_get_event (kbp, used_mouse_menu) #endif /* not VMS */ } + if (CONSP (Vunread_command_events)) + { + Lisp_Object first; + first = XCONS (Vunread_command_events)->car; + Vunread_command_events = XCONS (Vunread_command_events)->cdr; + *kbp = current_kboard; + return first; + } + /* At this point, we know that there is a readable event available somewhere. If the event queue is empty, then there must be a mouse movement enabled and available. */ @@ -7092,7 +7111,8 @@ DEFUN ("execute-extended-command", Fexecute_extended_command, Sexecute_extended_ /* But first wait, and skip the message if there is input. */ if (!NILP (Fsit_for ((NUMBERP (Vsuggest_key_bindings) ? Vsuggest_key_bindings : make_number (2)), - Qnil, Qnil))) + Qnil, Qnil)) + && ! CONSP (Vunread_command_events)) { Lisp_Object binding; char *newmessage; |