diff options
author | Kim F. Storm <storm@cua.dk> | 2006-07-10 23:52:38 +0000 |
---|---|---|
committer | Kim F. Storm <storm@cua.dk> | 2006-07-10 23:52:38 +0000 |
commit | 01327edf8885f4ab47d33681582c41879f842217 (patch) | |
tree | eb3f00c43493694d67f7b5868577665cbb235b9a /src/dispnew.c | |
parent | c876e7b757f20e8be135e3b4b0fb27784345bdbb (diff) | |
download | emacs-01327edf8885f4ab47d33681582c41879f842217.tar.gz |
(Fredisplay): Add FORCE argument to force redisplay when
input is available. Fix test for redisplay_dont_pause non-nil.
Specbind redisplay-dont-pause to t if FORCE non-nil.
Diffstat (limited to 'src/dispnew.c')
-rw-r--r-- | src/dispnew.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/dispnew.c b/src/dispnew.c index 857ae40ee34..17c5f05053f 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -6532,19 +6532,26 @@ sit_for (sec, usec, reading, display, initial_display) } -DEFUN ("redisplay", Fredisplay, Sredisplay, 0, 0, 0, - doc: /* Perform redisplay. -If input is available before this starts, redisplay is preempted -unless `redisplay-dont-pause' is non-nil. */) - () +DEFUN ("redisplay", Fredisplay, Sredisplay, 0, 1, 0, + doc: /* Perform redisplay if no input is available. +If optional arg FORCE is non-nil, perform a full redisplay even if +input is available. */) + (force) + Lisp_Object force; { + int count; + swallow_events (Qt); if ((detect_input_pending_run_timers (Qt) - && NILP (Qredisplay_dont_pause)) + && NILP (force) && !redisplay_dont_pause) || !NILP (Vexecuting_kbd_macro)) return Qnil; + count = SPECPDL_INDEX (); + if (!NILP (force) && !redisplay_dont_pause) + specbind (Qredisplay_dont_pause, Qt); redisplay_preserve_echo_area (2); + unbind_to (count, Qnil); return Qt; } |