+2001-12-16 Richard M. Stallman <rms@gnu.org>
+
+ * 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 <rms@gnu.org>
* keyboard.c (syms_of_keyboard) <double-click-fuzz>: Doc fix.
+---------------------------------+
| |
| V
- +--------------+ redisplay() +----------------+
+ +--------------+ redisplay +----------------+
| Lisp machine |---------------->| Redisplay code |<--+
+--------------+ (xdisp.c) +----------------+ |
^ | |
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
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 *));
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:
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;
+}
+\f
/* 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. */