From: Martin Rudalics Date: Fri, 14 Sep 2012 06:55:38 +0000 (+0200) Subject: In Fformat_mode_line always save/restore current buffer. (Bug#12387) X-Git-Tag: emacs-24.2.90~277 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6b533e9cb5c66766cbc2a222d86c2d441e7d2e43;p=emacs.git In Fformat_mode_line always save/restore current buffer. (Bug#12387) * xdisp.c (Fformat_mode_line): Unconditionally save/restore current buffer. (Bug#12387) --- diff --git a/src/ChangeLog b/src/ChangeLog index 0f741c5c4cf..5cda8241916 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-09-14 Martin Rudalics + + * xdisp.c (Fformat_mode_line): Unconditionally save/restore + current buffer (Bug#12387). + 2012-09-14 Juanma Barranquero * makefile.w32-in ($(BLD)/alloc.$(O)): Update dependencies. diff --git a/src/xdisp.c b/src/xdisp.c index e9d9595d91e..320998a5713 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -21039,8 +21039,7 @@ are the selected window and the WINDOW's buffer). */) : EQ (face, Qtool_bar) ? TOOL_BAR_FACE_ID : DEFAULT_FACE_ID; - if (XBUFFER (buffer) != current_buffer) - old_buffer = current_buffer; + old_buffer = current_buffer; /* Save things including mode_line_proptrans_alist, and set that to nil so that we don't alter the outer value. */ @@ -21051,8 +21050,7 @@ are the selected window and the WINDOW's buffer). */) mode_line_proptrans_alist = Qnil; Fselect_window (window, Qt); - if (old_buffer) - set_buffer_internal_1 (XBUFFER (buffer)); + set_buffer_internal_1 (XBUFFER (buffer)); init_iterator (&it, w, -1, -1, NULL, face_id);