diff options
| author | Gerd Moellmann | 2000-12-18 10:53:51 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-12-18 10:53:51 +0000 |
| commit | 9baacf7602da08acb07cd5228150de8abe1a7bf5 (patch) | |
| tree | e6d3cd0ce6c8018304deed726c2c93022ff29051 /src/process.c | |
| parent | 22ea260792c9a8a53e7eb7f723cd3751b61427b6 (diff) | |
| download | emacs-9baacf7602da08acb07cd5228150de8abe1a7bf5.tar.gz emacs-9baacf7602da08acb07cd5228150de8abe1a7bf5.zip | |
(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 1394b6b8b3c..729dc43e429 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -2436,18 +2436,19 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) | |||
| 2436 | if (! wait_for_cell) | 2436 | if (! wait_for_cell) |
| 2437 | { | 2437 | { |
| 2438 | EMACS_TIME timer_delay; | 2438 | EMACS_TIME timer_delay; |
| 2439 | int old_timers_run; | ||
| 2440 | 2439 | ||
| 2441 | retry: | 2440 | do |
| 2442 | old_timers_run = timers_run; | ||
| 2443 | timer_delay = timer_check (1); | ||
| 2444 | if (timers_run != old_timers_run && do_display) | ||
| 2445 | { | 2441 | { |
| 2446 | redisplay_preserve_echo_area (); | 2442 | int old_timers_run = timers_run; |
| 2447 | /* We must retry, since a timer may have requeued itself | 2443 | timer_delay = timer_check (1); |
| 2448 | and that could alter the time_delay. */ | 2444 | if (timers_run != old_timers_run && do_display) |
| 2449 | goto retry; | 2445 | /* We must retry, since a timer may have requeued itself |
| 2446 | and that could alter the time_delay. */ | ||
| 2447 | redisplay_preserve_echo_area (); | ||
| 2448 | else | ||
| 2449 | break; | ||
| 2450 | } | 2450 | } |
| 2451 | while (!detect_input_pending ()); | ||
| 2451 | 2452 | ||
| 2452 | /* If there is unread keyboard input, also return. */ | 2453 | /* If there is unread keyboard input, also return. */ |
| 2453 | if (XINT (read_kbd) != 0 | 2454 | if (XINT (read_kbd) != 0 |
| @@ -4785,18 +4786,19 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) | |||
| 4785 | if (! wait_for_cell) | 4786 | if (! wait_for_cell) |
| 4786 | { | 4787 | { |
| 4787 | EMACS_TIME timer_delay; | 4788 | EMACS_TIME timer_delay; |
| 4788 | int old_timers_run; | ||
| 4789 | 4789 | ||
| 4790 | retry: | 4790 | do |
| 4791 | old_timers_run = timers_run; | ||
| 4792 | timer_delay = timer_check (1); | ||
| 4793 | if (timers_run != old_timers_run && do_display) | ||
| 4794 | { | 4791 | { |
| 4795 | redisplay_preserve_echo_area (); | 4792 | int old_timers_run = timers_run; |
| 4796 | /* We must retry, since a timer may have requeued itself | 4793 | timer_delay = timer_check (1); |
| 4797 | and that could alter the time delay. */ | 4794 | if (timers_run != old_timers_run && do_display) |
| 4798 | goto retry; | 4795 | /* We must retry, since a timer may have requeued itself |
| 4796 | and that could alter the time delay. */ | ||
| 4797 | redisplay_preserve_echo_area (); | ||
| 4798 | else | ||
| 4799 | break; | ||
| 4799 | } | 4800 | } |
| 4801 | while (!detect_input_pending ()); | ||
| 4800 | 4802 | ||
| 4801 | /* If there is unread keyboard input, also return. */ | 4803 | /* If there is unread keyboard input, also return. */ |
| 4802 | if (XINT (read_kbd) != 0 | 4804 | if (XINT (read_kbd) != 0 |