diff options
| author | Richard M. Stallman | 2001-12-16 20:02:08 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2001-12-16 20:02:08 +0000 |
| commit | 82a7ab23a092ee9852c1cf8e46afb38d016d525f (patch) | |
| tree | 88e3d257c1d2d2685d5b03d1f33c7c7c0b3219ab /src | |
| parent | 0fa5d25b19cc2fdb0b73f10855e515e26be1b54f (diff) | |
| download | emacs-82a7ab23a092ee9852c1cf8e46afb38d016d525f.tar.gz emacs-82a7ab23a092ee9852c1cf8e46afb38d016d525f.zip | |
(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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 14 | ||||
| -rw-r--r-- | src/xdisp.c | 43 |
2 files changed, 54 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 7c412bf1b6f..06327c62841 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,17 @@ | |||
| 1 | 2001-12-16 Richard M. Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * buffer.h (struct buffer): New field `display_error_modiff'. | ||
| 4 | * buffer.c (reset_buffer): Initialize `display_error_modiff'. | ||
| 5 | |||
| 6 | * window.c (Frecenter): Clear display_error_modiff field. | ||
| 7 | |||
| 8 | * xdisp.c (redisplay_window_0, redisplay_window_1): New functions. | ||
| 9 | Call redisplay_window, but not if display_error_modiff field says no. | ||
| 10 | (redisplay_window_error): New function. | ||
| 11 | (displayed_buffer): New variable. | ||
| 12 | (redisplay_internal, redisplay_windows): Call the new functions | ||
| 13 | instead of redisplay_window directly. | ||
| 14 | |||
| 1 | 2001-12-15 Richard M. Stallman <rms@gnu.org> | 15 | 2001-12-15 Richard M. Stallman <rms@gnu.org> |
| 2 | 16 | ||
| 3 | * keyboard.c (syms_of_keyboard) <double-click-fuzz>: Doc fix. | 17 | * keyboard.c (syms_of_keyboard) <double-click-fuzz>: 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. */ | |||
| 52 | +---------------------------------+ | 52 | +---------------------------------+ |
| 53 | | | | 53 | | | |
| 54 | | V | 54 | | V |
| 55 | +--------------+ redisplay() +----------------+ | 55 | +--------------+ redisplay +----------------+ |
| 56 | | Lisp machine |---------------->| Redisplay code |<--+ | 56 | | Lisp machine |---------------->| Redisplay code |<--+ |
| 57 | +--------------+ (xdisp.c) +----------------+ | | 57 | +--------------+ (xdisp.c) +----------------+ | |
| 58 | ^ | | | 58 | ^ | | |
| @@ -593,6 +593,10 @@ Lisp_Object Vimage_types; | |||
| 593 | 593 | ||
| 594 | Lisp_Object Vresize_mini_windows; | 594 | Lisp_Object Vresize_mini_windows; |
| 595 | 595 | ||
| 596 | /* Buffer being redisplayed -- for redisplay_window_error. */ | ||
| 597 | |||
| 598 | struct buffer *displayed_buffer; | ||
| 599 | |||
| 596 | /* Value returned from text property handlers (see below). */ | 600 | /* Value returned from text property handlers (see below). */ |
| 597 | 601 | ||
| 598 | enum prop_handled | 602 | enum prop_handled |
| @@ -733,6 +737,9 @@ static void redisplay_internal P_ ((int)); | |||
| 733 | static int echo_area_display P_ ((int)); | 737 | static int echo_area_display P_ ((int)); |
| 734 | static void redisplay_windows P_ ((Lisp_Object)); | 738 | static void redisplay_windows P_ ((Lisp_Object)); |
| 735 | static void redisplay_window P_ ((Lisp_Object, int)); | 739 | static void redisplay_window P_ ((Lisp_Object, int)); |
| 740 | static Lisp_Object redisplay_window_error (); | ||
| 741 | static Lisp_Object redisplay_window_0 P_ ((Lisp_Object)); | ||
| 742 | static Lisp_Object redisplay_window_1 P_ ((Lisp_Object)); | ||
| 736 | static void update_menu_bar P_ ((struct frame *, int)); | 743 | static void update_menu_bar P_ ((struct frame *, int)); |
| 737 | static int try_window_reusing_current_matrix P_ ((struct window *)); | 744 | static int try_window_reusing_current_matrix P_ ((struct window *)); |
| 738 | static int try_window_id P_ ((struct window *)); | 745 | static int try_window_id P_ ((struct window *)); |
| @@ -8883,7 +8890,9 @@ redisplay_internal (preserve_echo_area) | |||
| 8883 | Lisp_Object mini_window; | 8890 | Lisp_Object mini_window; |
| 8884 | struct frame *mini_frame; | 8891 | struct frame *mini_frame; |
| 8885 | 8892 | ||
| 8886 | redisplay_window (selected_window, 1); | 8893 | displayed_buffer = XBUFFER (XWINDOW (selected_window)->buffer); |
| 8894 | internal_condition_case_1 (redisplay_window_1, selected_window, Qerror, | ||
| 8895 | redisplay_window_error); | ||
| 8887 | 8896 | ||
| 8888 | /* Compare desired and current matrices, perform output. */ | 8897 | /* Compare desired and current matrices, perform output. */ |
| 8889 | update: | 8898 | update: |
| @@ -9219,13 +9228,41 @@ redisplay_windows (window) | |||
| 9219 | else if (!NILP (w->vchild)) | 9228 | else if (!NILP (w->vchild)) |
| 9220 | redisplay_windows (w->vchild); | 9229 | redisplay_windows (w->vchild); |
| 9221 | else | 9230 | else |
| 9222 | redisplay_window (window, 0); | 9231 | { |
| 9232 | displayed_buffer = XBUFFER (w->buffer); | ||
| 9233 | internal_condition_case_1 (redisplay_window_0, window, Qerror, | ||
| 9234 | redisplay_window_error); | ||
| 9235 | } | ||
| 9223 | 9236 | ||
| 9224 | window = w->next; | 9237 | window = w->next; |
| 9225 | } | 9238 | } |
| 9226 | } | 9239 | } |
| 9227 | 9240 | ||
| 9241 | static Lisp_Object | ||
| 9242 | redisplay_window_error () | ||
| 9243 | { | ||
| 9244 | displayed_buffer->display_error_modiff = BUF_MODIFF (displayed_buffer); | ||
| 9245 | return Qnil; | ||
| 9246 | } | ||
| 9247 | |||
| 9248 | static Lisp_Object | ||
| 9249 | redisplay_window_0 (window) | ||
| 9250 | Lisp_Object window; | ||
| 9251 | { | ||
| 9252 | if (displayed_buffer->display_error_modiff < BUF_MODIFF (displayed_buffer)) | ||
| 9253 | redisplay_window (window, 0); | ||
| 9254 | return Qnil; | ||
| 9255 | } | ||
| 9228 | 9256 | ||
| 9257 | static Lisp_Object | ||
| 9258 | redisplay_window_1 (window) | ||
| 9259 | Lisp_Object window; | ||
| 9260 | { | ||
| 9261 | if (displayed_buffer->display_error_modiff < BUF_MODIFF (displayed_buffer)) | ||
| 9262 | redisplay_window (window, 1); | ||
| 9263 | return Qnil; | ||
| 9264 | } | ||
| 9265 | |||
| 9229 | /* Set cursor position of W. PT is assumed to be displayed in ROW. | 9266 | /* Set cursor position of W. PT is assumed to be displayed in ROW. |
| 9230 | DELTA is the number of bytes by which positions recorded in ROW | 9267 | DELTA is the number of bytes by which positions recorded in ROW |
| 9231 | differ from current buffer positions. */ | 9268 | differ from current buffer positions. */ |