diff options
author | Gerd Moellmann <[email protected]> | 2000-12-18 10:53:51 +0000 |
---|---|---|
committer | Gerd Moellmann <[email protected]> | 2000-12-18 10:53:51 +0000 |
commit | 9baacf7602da08acb07cd5228150de8abe1a7bf5 (patch) | |
tree | e6d3cd0ce6c8018304deed726c2c93022ff29051 /src/process.c | |
parent | 22ea260792c9a8a53e7eb7f723cd3751b61427b6 (diff) |
(wait_reading_process_input): Check for pending
input when running timers.
Diffstat (limited to 'src/process.c')
-rw-r--r-- | src/process.c | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/src/process.c b/src/process.c index 1394b6b8b3..729dc43e42 100644 --- a/src/process.c +++ b/src/process.c @@ -2436,18 +2436,19 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) if (! wait_for_cell) { EMACS_TIME timer_delay; - int old_timers_run; - retry: - old_timers_run = timers_run; - timer_delay = timer_check (1); - if (timers_run != old_timers_run && do_display) + do { - redisplay_preserve_echo_area (); - /* We must retry, since a timer may have requeued itself - and that could alter the time_delay. */ - goto retry; + int old_timers_run = timers_run; + timer_delay = timer_check (1); + if (timers_run != old_timers_run && do_display) + /* We must retry, since a timer may have requeued itself + and that could alter the time_delay. */ + redisplay_preserve_echo_area (); + else + break; } + while (!detect_input_pending ()); /* If there is unread keyboard input, also return. */ if (XINT (read_kbd) != 0 @@ -4785,18 +4786,19 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) if (! wait_for_cell) { EMACS_TIME timer_delay; - int old_timers_run; - retry: - old_timers_run = timers_run; - timer_delay = timer_check (1); - if (timers_run != old_timers_run && do_display) + do { - redisplay_preserve_echo_area (); - /* We must retry, since a timer may have requeued itself - and that could alter the time delay. */ - goto retry; + int old_timers_run = timers_run; + timer_delay = timer_check (1); + if (timers_run != old_timers_run && do_display) + /* We must retry, since a timer may have requeued itself + and that could alter the time delay. */ + redisplay_preserve_echo_area (); + else + break; } + while (!detect_input_pending ()); /* If there is unread keyboard input, also return. */ if (XINT (read_kbd) != 0 |