if (NILP (window))
window = display_buffer (Vother_window_scroll_buffer, Qt, Qnil);
}
+ else if (FUNCTIONP (Vother_window_scroll_default))
+ /* Nothing specified; try to get a window from the function. */
+ window = call0 (Vother_window_scroll_default);
else
{
- /* Nothing specified; look for a neighboring window on the same
- frame. */
+ /* Otherwise, look for a neighboring window on the same frame. */
window = Fnext_window (selected_window, Qlambda, Qnil);
if (EQ (window, selected_window))
doc: /* If this is a live buffer, \\[scroll-other-window] should scroll its window. */);
Vother_window_scroll_buffer = Qnil;
+ DEFVAR_LISP ("other-window-scroll-default", Vother_window_scroll_default,
+ doc: /* Function that provides the window to scroll by \\[scroll-other-window].
+The function `other-window-for-scrolling' first tries to use
+`minibuffer-scroll-window' and `other-window-scroll-buffer'.
+But when both are nil, then by default it uses a neighboring window.
+This variable is intended to get another default instead of `next-window'. */);
+ Vother_window_scroll_default = Qnil;
+
DEFVAR_BOOL ("auto-window-vscroll", auto_window_vscroll_p,
doc: /* Non-nil means to automatically adjust `window-vscroll' to view tall lines. */);
auto_window_vscroll_p = true;