Mercurial > emacs
comparison src/process.c @ 34660:75866a7ebaec
(wait_reading_process_input): Check for pending
input when running timers.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Mon, 18 Dec 2000 10:53:51 +0000 |
parents | 1898b3c996ff |
children | 002c02db42d3 |
comparison
equal
deleted
inserted
replaced
34659:7085cd9344ce | 34660:75866a7ebaec |
---|---|
2434 the wait is supposed to be short, | 2434 the wait is supposed to be short, |
2435 and those callers cannot handle running arbitrary Lisp code here. */ | 2435 and those callers cannot handle running arbitrary Lisp code here. */ |
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; | 2439 |
2440 | 2440 do |
2441 retry: | |
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 |
2454 && requeued_events_pending_p ()) | 2455 && requeued_events_pending_p ()) |
2455 break; | 2456 break; |
4783 (Callers that will immediately read keyboard events | 4784 (Callers that will immediately read keyboard events |
4784 call timer_delay on their own.) */ | 4785 call timer_delay on their own.) */ |
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 do |
4790 retry: | |
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 |
4803 && requeued_events_pending_p ()) | 4805 && requeued_events_pending_p ()) |
4804 break; | 4806 break; |