diff options
author | Karl Heuer <kwzh@gnu.org> | 1996-02-21 21:08:31 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1996-02-21 21:08:31 +0000 |
commit | 20a35d044630416cfa18ce0a5989798d805b0c49 (patch) | |
tree | 1d8386a561565c71f4b35b62d0900034eec19e21 /src/process.c | |
parent | 30a0f8ec1426714a3514d356001dfca68a3659f6 (diff) | |
download | emacs-20a35d044630416cfa18ce0a5989798d805b0c49.tar.gz |
(wait_reading_process_input):
Pass new arg to swallow_events.
(wait_reading_process_input): If read_kbd is 1,
use detect_input_pending_run_timers instead of detect_input_pending.
Diffstat (limited to 'src/process.c')
-rw-r--r-- | src/process.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/process.c b/src/process.c index 443da073337..2dd472b463e 100644 --- a/src/process.c +++ b/src/process.c @@ -2193,7 +2193,7 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) #endif } else - error("select error: %s", strerror (xerrno)); + error ("select error: %s", strerror (xerrno)); } #if defined(sun) && !defined(USG5_4) else if (nfds > 0 && keyboard_bit_set (&Available) @@ -2212,16 +2212,21 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) /* If there is any, return immediately to give it higher priority than subprocesses */ - /* We used to do this if wait_for_cell, - but that caused infinite recursion in selection request events. */ - if ((XINT (read_kbd) || wait_for_cell) - && detect_input_pending ()) + if (XINT (read_kbd) < 0 && detect_input_pending ()) { - swallow_events (); + swallow_events (do_display); if (detect_input_pending ()) break; } + if ((XINT (read_kbd) > 0 || wait_for_cell) + && detect_input_pending_run_timers ()) + { + swallow_events (do_display); + if (detect_input_pending_run_timers ()) + break; + } + /* Exit now if the cell we're waiting for became non-nil. */ if (wait_for_cell && ! NILP (*wait_for_cell)) break; |