aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorRichard M. Stallman1996-04-12 06:02:54 +0000
committerRichard M. Stallman1996-04-12 06:02:54 +0000
commit3d6163992d1b84d9faed1b2053832f01adb2b516 (patch)
tree64a7bc99e05244c1f1a69f525497e82b22d69800 /src/process.c
parent4ec4ed6a5e1822f2fcef1e05fa2ea743fc0fb467 (diff)
downloademacs-3d6163992d1b84d9faed1b2053832f01adb2b516.tar.gz
emacs-3d6163992d1b84d9faed1b2053832f01adb2b516.zip
(wait_reading_process_input, both definitions):
Don't call detect_input_pending; use detect_input_pending_run_timers.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c54
1 files changed, 25 insertions, 29 deletions
diff --git a/src/process.c b/src/process.c
index 81443094818..09d262f0c6f 100644
--- a/src/process.c
+++ b/src/process.c
@@ -2174,14 +2174,19 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
2174 set_waiting_for_input (&timeout); 2174 set_waiting_for_input (&timeout);
2175 } 2175 }
2176 2176
2177 if (XINT (read_kbd) && detect_input_pending ()) 2177 {
2178 { 2178 int old_timers_run = timers_run;
2179 nfds = 0; 2179 if (XINT (read_kbd) && detect_input_pending_run_timers (do_display))
2180 FD_ZERO (&Available); 2180 {
2181 } 2181 nfds = 0;
2182 else 2182 FD_ZERO (&Available);
2183 nfds = select (MAXDESC, &Available, (SELECT_TYPE *)0, (SELECT_TYPE *)0, 2183 }
2184 &timeout); 2184 else if (timers_run != old_timers_run)
2185 ;
2186 else
2187 nfds = select (MAXDESC, &Available, (SELECT_TYPE *)0, (SELECT_TYPE *)0,
2188 &timeout);
2189 }
2185 2190
2186 xerrno = errno; 2191 xerrno = errno;
2187 2192
@@ -2248,14 +2253,7 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
2248 /* If there is any, return immediately 2253 /* If there is any, return immediately
2249 to give it higher priority than subprocesses */ 2254 to give it higher priority than subprocesses */
2250 2255
2251 if (XINT (read_kbd) < 0 && detect_input_pending ()) 2256 if ((XINT (read_kbd) != 0 || wait_for_cell)
2252 {
2253 swallow_events (do_display);
2254 if (detect_input_pending ())
2255 break;
2256 }
2257
2258 if ((XINT (read_kbd) > 0 || wait_for_cell)
2259 && detect_input_pending_run_timers (do_display)) 2257 && detect_input_pending_run_timers (do_display))
2260 { 2258 {
2261 swallow_events (do_display); 2259 swallow_events (do_display);
@@ -3930,11 +3928,16 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
3930 if (frame_garbaged && do_display) 3928 if (frame_garbaged && do_display)
3931 redisplay_preserve_echo_area (); 3929 redisplay_preserve_echo_area ();
3932 3930
3933 if (XINT (read_kbd) && detect_input_pending ()) 3931 {
3934 nfds = 0; 3932 int old_timers_run = timers_run;
3935 else 3933 if (XINT (read_kbd) && detect_input_pending_run_timers (do_display))
3936 nfds = select (1, &waitchannels, (SELECT_TYPE *)0, (SELECT_TYPE *)0, 3934 nfds = 0;
3937 &timeout); 3935 else if (timers_run != old_timers_run)
3936 ;
3937 else
3938 nfds = select (1, &waitchannels, (SELECT_TYPE *)0, (SELECT_TYPE *)0,
3939 &timeout);
3940 }
3938 3941
3939 xerrno = errno; 3942 xerrno = errno;
3940 3943
@@ -3969,14 +3972,7 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
3969 3972
3970 /* Check for keyboard input */ 3973 /* Check for keyboard input */
3971 3974
3972 if (XINT (read_kbd) < 0 && detect_input_pending ()) 3975 if (XINT (read_kbd) != 0
3973 {
3974 swallow_events (do_display);
3975 if (detect_input_pending ())
3976 break;
3977 }
3978
3979 if (XINT (read_kbd) > 0
3980 && detect_input_pending_run_timers (do_display)) 3976 && detect_input_pending_run_timers (do_display))
3981 { 3977 {
3982 swallow_events (do_display); 3978 swallow_events (do_display);