From 2907acd464d055256efb84afb0a8c978befa8bc6 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Sat, 1 Mar 2014 20:15:29 +0100 Subject: [PATCH] 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. --- src/ChangeLog | 7 +++++++ src/window.c | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 1f351e71403..3425b504a71 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2014-03-01 Martin Rudalics + + 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 * fileio.c (Fexpand_file_name) [WINDOWSNT]: Don't treat file names diff --git a/src/window.c b/src/window.c index b2a6ff4ff2d..09280d206c3 100644 --- a/src/window.c +++ b/src/window.c @@ -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, -- 2.39.2