aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2006-06-13 22:06:22 +0000
committerKim F. Storm2006-06-13 22:06:22 +0000
commitf222369e0aa7afbea32c037c40eb84da809744f2 (patch)
tree8decd1a56efc0e6c3cc3fcc21d55d6bd37b5c52e /src
parentbae1ed29656d8ab57135607cc5357e73c7e6f010 (diff)
downloademacs-f222369e0aa7afbea32c037c40eb84da809744f2.tar.gz
emacs-f222369e0aa7afbea32c037c40eb84da809744f2.zip
(sit_for): Undo 2006-06-01 change. Instead, a
negative time forces redisplay even when input is available. (Fsit_for): Doc fix.
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index e205105536c..43f86a32f4c 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -6495,15 +6495,22 @@ Lisp_Object
6495sit_for (sec, usec, reading, display, initial_display) 6495sit_for (sec, usec, reading, display, initial_display)
6496 int sec, usec, reading, display, initial_display; 6496 int sec, usec, reading, display, initial_display;
6497{ 6497{
6498 int preempt = (sec >= 0) || (sec == 0 && usec >= 0);
6499
6498 swallow_events (display); 6500 swallow_events (display);
6499 6501
6500 if ((detect_input_pending_run_timers (display) 6502 if ((detect_input_pending_run_timers (display) && preempt)
6501 && !redisplay_dont_pause)
6502 || !NILP (Vexecuting_kbd_macro)) 6503 || !NILP (Vexecuting_kbd_macro))
6503 return Qnil; 6504 return Qnil;
6504 6505
6505 if (initial_display) 6506 if (initial_display)
6506 redisplay_preserve_echo_area (2); 6507 {
6508 int count = SPECPDL_INDEX ();
6509 if (!preempt)
6510 specbind (Qredisplay_dont_pause, Qt);
6511 redisplay_preserve_echo_area (2);
6512 unbind_to (count, Qnil);
6513 }
6507 6514
6508 if (sec == 0 && usec == 0) 6515 if (sec == 0 && usec == 0)
6509 return Qt; 6516 return Qt;
@@ -6529,8 +6536,7 @@ Redisplay is preempted as always if input arrives, and does not happen
6529if input is available before it starts. 6536if input is available before it starts.
6530Value is t if waited the full time with no input arriving. 6537Value is t if waited the full time with no input arriving.
6531 6538
6532Redisplay will occur even when input is available if you bind 6539Redisplay will occur even when input is available if SECONDS is negative.
6533`redisplay-dont-pause' to a non-nil value.
6534 6540
6535An obsolete but still supported form is 6541An obsolete but still supported form is
6536\(sit-for SECONDS &optional MILLISECONDS NODISP) 6542\(sit-for SECONDS &optional MILLISECONDS NODISP)