aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2005-05-31 22:46:22 +0000
committerKim F. Storm2005-05-31 22:46:22 +0000
commit53088ce86c72caab017ddef59a5a6b9319fcc3d8 (patch)
tree29345ce2d6799b9e7ace485d2e775d239aa33a4f /src
parent95d4fad837329b0b9eaa30a6e68c01024f7e9f82 (diff)
downloademacs-53088ce86c72caab017ddef59a5a6b9319fcc3d8.tar.gz
emacs-53088ce86c72caab017ddef59a5a6b9319fcc3d8.zip
(display_mode_line): Support nested calls to redisplay
and format-mode-line. Set mode_line_target to MODE_LINE_DISPLAY.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index fcfc8090277..29fdbab5d78 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -8352,8 +8352,8 @@ x_consider_frame_title (frame)
8352 multiple_frames = CONSP (tail); 8352 multiple_frames = CONSP (tail);
8353 8353
8354 /* Switch to the buffer of selected window of the frame. Set up 8354 /* Switch to the buffer of selected window of the frame. Set up
8355 mode_line_noprop_ptr so that display_mode_element will output into it; 8355 mode_line_target so that display_mode_element will output into
8356 then display the title. */ 8356 mode_line_noprop_buf; then display the title. */
8357 record_unwind_protect (unwind_format_mode_line, 8357 record_unwind_protect (unwind_format_mode_line,
8358 format_mode_line_unwind_data (current_buffer)); 8358 format_mode_line_unwind_data (current_buffer));
8359 8359
@@ -15672,6 +15672,7 @@ display_mode_line (w, face_id, format)
15672{ 15672{
15673 struct it it; 15673 struct it it;
15674 struct face *face; 15674 struct face *face;
15675 int count = SPECPDL_INDEX ();
15675 15676
15676 init_iterator (&it, w, -1, -1, NULL, face_id); 15677 init_iterator (&it, w, -1, -1, NULL, face_id);
15677 prepare_desired_row (it.glyph_row); 15678 prepare_desired_row (it.glyph_row);
@@ -15682,6 +15683,11 @@ display_mode_line (w, face_id, format)
15682 /* Force the mode-line to be displayed in the default face. */ 15683 /* Force the mode-line to be displayed in the default face. */
15683 it.base_face_id = it.face_id = DEFAULT_FACE_ID; 15684 it.base_face_id = it.face_id = DEFAULT_FACE_ID;
15684 15685
15686 record_unwind_protect (unwind_format_mode_line,
15687 format_mode_line_unwind_data (NULL));
15688
15689 mode_line_target = MODE_LINE_DISPLAY;
15690
15685 /* Temporarily make frame's keyboard the current kboard so that 15691 /* Temporarily make frame's keyboard the current kboard so that
15686 kboard-local variables in the mode_line_format will get the right 15692 kboard-local variables in the mode_line_format will get the right
15687 values. */ 15693 values. */
@@ -15689,6 +15695,8 @@ display_mode_line (w, face_id, format)
15689 display_mode_element (&it, 0, 0, 0, format, Qnil, 0); 15695 display_mode_element (&it, 0, 0, 0, format, Qnil, 0);
15690 pop_frame_kboard (); 15696 pop_frame_kboard ();
15691 15697
15698 unbind_to (count, Qnil);
15699
15692 /* Fill up with spaces. */ 15700 /* Fill up with spaces. */
15693 display_string (" ", Qnil, Qnil, 0, 0, &it, 10000, -1, -1, 0); 15701 display_string (" ", Qnil, Qnil, 0, 0, &it, 10000, -1, -1, 0);
15694 15702