aboutsummaryrefslogtreecommitdiffstats
path: root/src/xdisp.c
diff options
context:
space:
mode:
authorKim F. Storm <[email protected]>2005-05-31 22:46:22 +0000
committerKim F. Storm <[email protected]>2005-05-31 22:46:22 +0000
commit53088ce86c72caab017ddef59a5a6b9319fcc3d8 (patch)
tree29345ce2d6799b9e7ace485d2e775d239aa33a4f /src/xdisp.c
parent95d4fad837329b0b9eaa30a6e68c01024f7e9f82 (diff)
(display_mode_line): Support nested calls to redisplay
and format-mode-line. Set mode_line_target to MODE_LINE_DISPLAY.
Diffstat (limited to 'src/xdisp.c')
-rw-r--r--src/xdisp.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index fcfc809027..29fdbab5d7 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -8352,8 +8352,8 @@ x_consider_frame_title (frame)
multiple_frames = CONSP (tail);
/* Switch to the buffer of selected window of the frame. Set up
- mode_line_noprop_ptr so that display_mode_element will output into it;
- then display the title. */
+ mode_line_target so that display_mode_element will output into
+ mode_line_noprop_buf; then display the title. */
record_unwind_protect (unwind_format_mode_line,
format_mode_line_unwind_data (current_buffer));
@@ -15672,6 +15672,7 @@ display_mode_line (w, face_id, format)
{
struct it it;
struct face *face;
+ int count = SPECPDL_INDEX ();
init_iterator (&it, w, -1, -1, NULL, face_id);
prepare_desired_row (it.glyph_row);
@@ -15682,6 +15683,11 @@ display_mode_line (w, face_id, format)
/* Force the mode-line to be displayed in the default face. */
it.base_face_id = it.face_id = DEFAULT_FACE_ID;
+ record_unwind_protect (unwind_format_mode_line,
+ format_mode_line_unwind_data (NULL));
+
+ mode_line_target = MODE_LINE_DISPLAY;
+
/* Temporarily make frame's keyboard the current kboard so that
kboard-local variables in the mode_line_format will get the right
values. */
@@ -15689,6 +15695,8 @@ display_mode_line (w, face_id, format)
display_mode_element (&it, 0, 0, 0, format, Qnil, 0);
pop_frame_kboard ();
+ unbind_to (count, Qnil);
+
/* Fill up with spaces. */
display_string (" ", Qnil, Qnil, 0, 0, &it, 10000, -1, -1, 0);