From 69645afc5310cb5cad6fc6769de55e9102ffaaa9 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 13 Jun 1997 00:45:19 +0000 Subject: [PATCH] (wait_reading_process_input): Return if unread events appear. --- src/process.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/process.c b/src/process.c index 1b8174299ff..a9da5b1f725 100644 --- a/src/process.c +++ b/src/process.c @@ -2248,6 +2248,11 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) goto retry; } + /* If there is unread keyboard input, also return. */ + if (XINT (read_kbd) != 0 + && requeued_events_pending_p ()) + break; + if (! EMACS_TIME_NEG_P (timer_delay) && time_limit != -1) { EMACS_TIME difference; @@ -2408,6 +2413,11 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) break; } + /* If there is unread keyboard input, also return. */ + if (XINT (read_kbd) != 0 + && requeued_events_pending_p ()) + break; + /* If wait_for_cell. check for keyboard input but don't run any timers. ??? (It seems wrong to me to check for keyboard -- 2.39.5