# HG changeset patch # User Richard M. Stallman # Date 866162793 0 # Node ID 7f396969701372525ab0e793fec8718fb68d5cf9 # Parent 2f1f942f25ca6b799a446d4d00394941411120b9 (kbd_buffer_get_event): When wait_reading_process_input returns, check Vunread_command_events. diff -r 2f1f942f25ca -r 7f3969697013 src/keyboard.c --- a/src/keyboard.c Fri Jun 13 00:45:19 1997 +0000 +++ b/src/keyboard.c Fri Jun 13 00:46:33 1997 +0000 @@ -1885,7 +1885,8 @@ 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 @@ 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 @@ } } + /* 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 @@ #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 @@ /* 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;