[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/dispnew.c,v
From: |
Kim F. Storm |
Subject: |
[Emacs-diffs] Changes to emacs/src/dispnew.c,v |
Date: |
Tue, 13 Jun 2006 22:06:22 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Kim F. Storm <kfstorm> 06/06/13 22:06:22
Index: dispnew.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/dispnew.c,v
retrieving revision 1.367
retrieving revision 1.368
diff -u -b -r1.367 -r1.368
--- dispnew.c 12 Jun 2006 22:32:47 -0000 1.367
+++ dispnew.c 13 Jun 2006 22:06:22 -0000 1.368
@@ -6495,15 +6495,22 @@
sit_for (sec, usec, reading, display, initial_display)
int sec, usec, reading, display, initial_display;
{
+ int preempt = (sec >= 0) || (sec == 0 && usec >= 0);
+
swallow_events (display);
- if ((detect_input_pending_run_timers (display)
- && !redisplay_dont_pause)
+ if ((detect_input_pending_run_timers (display) && preempt)
|| !NILP (Vexecuting_kbd_macro))
return Qnil;
if (initial_display)
+ {
+ int count = SPECPDL_INDEX ();
+ if (!preempt)
+ specbind (Qredisplay_dont_pause, Qt);
redisplay_preserve_echo_area (2);
+ unbind_to (count, Qnil);
+ }
if (sec == 0 && usec == 0)
return Qt;
@@ -6529,8 +6536,7 @@
if input is available before it starts.
Value is t if waited the full time with no input arriving.
-Redisplay will occur even when input is available if you bind
-`redisplay-dont-pause' to a non-nil value.
+Redisplay will occur even when input is available if SECONDS is negative.
An obsolete but still supported form is
\(sit-for SECONDS &optional MILLISECONDS NODISP)