+2008-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * window.c (set_window_buffer): Always preserve current-buffer.
+
2008-09-12 Glenn Morris <rgm@gnu.org>
* charset.c (init_charset): Warn if etc/charsets not found. (Bug#909)
\f
int window_select_count;
-Lisp_Object
-Fset_window_buffer_unwind (obuf)
- Lisp_Object obuf;
-{
- Fset_buffer (obuf);
- return Qnil;
-}
-
EXFUN (Fset_window_fringes, 4);
EXFUN (Fset_window_scroll_bars, 4);
I doubt it's worth the trouble. */
windows_or_buffers_changed++;
- /* We must select BUFFER for running the window-scroll-functions.
- If WINDOW is selected, switch permanently.
- Otherwise, switch but go back to the ambient buffer afterward. */
- if (EQ (window, selected_window))
- Fset_buffer (buffer);
+ /* We must select BUFFER for running the window-scroll-functions. */
/* We can't check ! NILP (Vwindow_scroll_functions) here
because that might itself be a local variable. */
- else if (window_initialized)
+ if (window_initialized)
{
- record_unwind_protect (Fset_window_buffer_unwind, Fcurrent_buffer ());
+ record_unwind_protect (Fset_buffer, Fcurrent_buffer ());
Fset_buffer (buffer);
}