]> git.eshelyaron.com Git - emacs.git/commitdiff
Consider Vother_window_scroll_buffer valid iff it's a live buffer.
authorMartin Rudalics <rudalics@gmx.at>
Sat, 1 Mar 2014 19:15:29 +0000 (20:15 +0100)
committerMartin Rudalics <rudalics@gmx.at>
Sat, 1 Mar 2014 19:15:29 +0000 (20:15 +0100)
* window.c (Fother_window_for_scrolling): Don't try to scroll a
killed Vother_window_scroll_buffer.
(Vother_window_scroll_buffer): Fix doc-string accordingly.

src/ChangeLog
src/window.c

index 1f351e71403232ce2033f0db1b2a58bcf93ba341..3425b504a71000bbe61e7ef7d903e9e33c9d5fd5 100644 (file)
@@ -1,3 +1,10 @@
+2014-03-01  Martin Rudalics  <rudalics@gmx.at>
+
+       Consider Vother_window_scroll_buffer valid iff it's a live buffer.
+       * window.c (Fother_window_for_scrolling): Don't try to scroll a
+       killed Vother_window_scroll_buffer.
+       (Vother_window_scroll_buffer): Fix doc-string accordingly.
+
 2014-03-01  Eli Zaretskii  <eliz@gnu.org>
 
        * fileio.c (Fexpand_file_name) [WINDOWSNT]: Don't treat file names
index b2a6ff4ff2d1ea941e91c0d7270d02b549ef2699..09280d206c3332d0926bf17bccbbf8e965bc1221 100644 (file)
@@ -5429,8 +5429,9 @@ specifies the window.  This takes precedence over
   if (MINI_WINDOW_P (XWINDOW (selected_window))
       && !NILP (Vminibuf_scroll_window))
     window = Vminibuf_scroll_window;
-  /* If buffer is specified, scroll that buffer.  */
-  else if (!NILP (Vother_window_scroll_buffer))
+  /* If buffer is specified and live, scroll that buffer.  */
+  else if (!NILP (Vother_window_scroll_buffer)
+          && BUFFER_LIVE_P (XBUFFER (Vother_window_scroll_buffer)))
     {
       window = Fget_buffer_window (Vother_window_scroll_buffer, Qnil);
       if (NILP (window))
@@ -7197,7 +7198,7 @@ is displayed in the `mode-line' face.  */);
   mode_line_in_non_selected_windows = 1;
 
   DEFVAR_LISP ("other-window-scroll-buffer", Vother_window_scroll_buffer,
-              doc: /* If non-nil, this is a buffer and \\[scroll-other-window] should scroll its window.  */);
+              doc: /* If this is a live buffer, \\[scroll-other-window] should scroll its window.  */);
   Vother_window_scroll_buffer = Qnil;
 
   DEFVAR_BOOL ("auto-window-vscroll", auto_window_vscroll_p,