Mercurial > emacs
comparison src/xdisp.c @ 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 | ea97be55d899 |
children | 2eeaeb542d76 |
comparison
equal
deleted
inserted
replaced
42089:ca7101bea5ee | 42090:c2bd9c005c06 |
---|---|
50 direct_output_for_insert, | 50 direct_output_for_insert, |
51 direct_forward_char (dispnew.c) | 51 direct_forward_char (dispnew.c) |
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 ^ | | |
59 +----------------------------------+ | | 59 +----------------------------------+ | |
60 Don't use this path when called | | 60 Don't use this path when called | |
590 mini-windows. If t, always resize them to fit the text they | 590 mini-windows. If t, always resize them to fit the text they |
591 display. If `grow-only', let mini-windows grow only until they | 591 display. If `grow-only', let mini-windows grow only until they |
592 become empty. */ | 592 become empty. */ |
593 | 593 |
594 Lisp_Object Vresize_mini_windows; | 594 Lisp_Object Vresize_mini_windows; |
595 | |
596 /* Buffer being redisplayed -- for redisplay_window_error. */ | |
597 | |
598 struct buffer *displayed_buffer; | |
595 | 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 |
599 { | 603 { |
731 static void sync_frame_with_window_matrix_rows P_ ((struct window *)); | 735 static void sync_frame_with_window_matrix_rows P_ ((struct window *)); |
732 static void redisplay_internal P_ ((int)); | 736 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 *)); |
739 static int display_line P_ ((struct it *)); | 746 static int display_line P_ ((struct it *)); |
740 static int display_mode_lines P_ ((struct window *)); | 747 static int display_mode_lines P_ ((struct window *)); |
8881 else if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf)) | 8888 else if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf)) |
8882 { | 8889 { |
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: |
8890 | 8899 |
8891 /* If fonts changed, display again. */ | 8900 /* If fonts changed, display again. */ |
9217 if (!NILP (w->hchild)) | 9226 if (!NILP (w->hchild)) |
9218 redisplay_windows (w->hchild); | 9227 redisplay_windows (w->hchild); |
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 |
9228 | 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 } | |
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. */ |
9232 | 9269 |
9233 void | 9270 void |