Mercurial > emacs
changeset 42090:c2bd9c005c06
(redisplay_window_0, redisplay_window_1): New functions.
Call redisplay_window, but not if display_error_modiff field says no.
(redisplay_window_error): New function.
(displayed_buffer): New variable.
(redisplay_internal, redisplay_windows): Call the new functions
instead of redisplay_window directly.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 16 Dec 2001 20:02:01 +0000 |
parents | ca7101bea5ee |
children | f7f7a6ba78db |
files | src/xdisp.c |
diffstat | 1 files changed, 41 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xdisp.c Sun Dec 16 20:01:48 2001 +0000 +++ b/src/xdisp.c Sun Dec 16 20:02:01 2001 +0000 @@ -52,7 +52,7 @@ +---------------------------------+ | | | V - +--------------+ redisplay() +----------------+ + +--------------+ redisplay +----------------+ | Lisp machine |---------------->| Redisplay code |<--+ +--------------+ (xdisp.c) +----------------+ | ^ | | @@ -593,6 +593,10 @@ Lisp_Object Vresize_mini_windows; +/* Buffer being redisplayed -- for redisplay_window_error. */ + +struct buffer *displayed_buffer; + /* Value returned from text property handlers (see below). */ enum prop_handled @@ -733,6 +737,9 @@ static int echo_area_display P_ ((int)); static void redisplay_windows P_ ((Lisp_Object)); static void redisplay_window P_ ((Lisp_Object, int)); +static Lisp_Object redisplay_window_error (); +static Lisp_Object redisplay_window_0 P_ ((Lisp_Object)); +static Lisp_Object redisplay_window_1 P_ ((Lisp_Object)); static void update_menu_bar P_ ((struct frame *, int)); static int try_window_reusing_current_matrix P_ ((struct window *)); static int try_window_id P_ ((struct window *)); @@ -8883,7 +8890,9 @@ Lisp_Object mini_window; struct frame *mini_frame; - redisplay_window (selected_window, 1); + displayed_buffer = XBUFFER (XWINDOW (selected_window)->buffer); + internal_condition_case_1 (redisplay_window_1, selected_window, Qerror, + redisplay_window_error); /* Compare desired and current matrices, perform output. */ update: @@ -9219,13 +9228,41 @@ else if (!NILP (w->vchild)) redisplay_windows (w->vchild); else - redisplay_window (window, 0); + { + displayed_buffer = XBUFFER (w->buffer); + internal_condition_case_1 (redisplay_window_0, window, Qerror, + redisplay_window_error); + } window = w->next; } } - +static Lisp_Object +redisplay_window_error () +{ + displayed_buffer->display_error_modiff = BUF_MODIFF (displayed_buffer); + return Qnil; +} + +static Lisp_Object +redisplay_window_0 (window) + Lisp_Object window; +{ + if (displayed_buffer->display_error_modiff < BUF_MODIFF (displayed_buffer)) + redisplay_window (window, 0); + return Qnil; +} + +static Lisp_Object +redisplay_window_1 (window) + Lisp_Object window; +{ + if (displayed_buffer->display_error_modiff < BUF_MODIFF (displayed_buffer)) + redisplay_window (window, 1); + return Qnil; +} + /* Set cursor position of W. PT is assumed to be displayed in ROW. DELTA is the number of bytes by which positions recorded in ROW differ from current buffer positions. */