From: Richard M. Stallman Date: Sun, 16 Dec 2001 20:02:08 +0000 (+0000) Subject: (redisplay_window_0, redisplay_window_1): New functions. X-Git-Tag: ttn-vms-21-2-B4~17676 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=82a7ab23a092ee9852c1cf8e46afb38d016d525f;p=emacs.git (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. --- diff --git a/src/ChangeLog b/src/ChangeLog index 7c412bf1b6f..06327c62841 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,17 @@ +2001-12-16 Richard M. Stallman + + * buffer.h (struct buffer): New field `display_error_modiff'. + * buffer.c (reset_buffer): Initialize `display_error_modiff'. + + * window.c (Frecenter): Clear display_error_modiff field. + + * xdisp.c (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. + 2001-12-15 Richard M. Stallman * keyboard.c (syms_of_keyboard) : Doc fix. diff --git a/src/xdisp.c b/src/xdisp.c index 2f3ced268bc..b2a5a1d08a5 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -52,7 +52,7 @@ Boston, MA 02111-1307, USA. */ +---------------------------------+ | | | V - +--------------+ redisplay() +----------------+ + +--------------+ redisplay +----------------+ | Lisp machine |---------------->| Redisplay code |<--+ +--------------+ (xdisp.c) +----------------+ | ^ | | @@ -593,6 +593,10 @@ Lisp_Object Vimage_types; 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 void redisplay_internal P_ ((int)); 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 @@ redisplay_internal (preserve_echo_area) 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 @@ redisplay_windows (window) 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. */