aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJuri Linkov2022-01-11 19:28:52 +0200
committerJuri Linkov2022-01-11 19:28:52 +0200
commitecdda194a82c8c52bdb948160f55ebbabe733d79 (patch)
treee1f4c1ffd91a85655ae45f0b6bc86764153376d1 /src
parent4765487d5d24fc8a2a06c329dc9cc3bed9803391 (diff)
downloademacs-ecdda194a82c8c52bdb948160f55ebbabe733d79.tar.gz
emacs-ecdda194a82c8c52bdb948160f55ebbabe733d79.zip
* src/window.c (other-window-scroll-default): New variable (bug#51210).
(Fother_window_for_scrolling): Use it.
Diffstat (limited to 'src')
-rw-r--r--src/window.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/window.c b/src/window.c
index 1e7c26b82e9..7155f0e6bc3 100644
--- a/src/window.c
+++ b/src/window.c
@@ -6307,10 +6307,12 @@ followed by all visible frames on the current terminal. */)
6307 if (NILP (window)) 6307 if (NILP (window))
6308 window = display_buffer (Vother_window_scroll_buffer, Qt, Qnil); 6308 window = display_buffer (Vother_window_scroll_buffer, Qt, Qnil);
6309 } 6309 }
6310 else if (FUNCTIONP (Vother_window_scroll_default))
6311 /* Nothing specified; try to get a window from the function. */
6312 window = call0 (Vother_window_scroll_default);
6310 else 6313 else
6311 { 6314 {
6312 /* Nothing specified; look for a neighboring window on the same 6315 /* Otherwise, look for a neighboring window on the same frame. */
6313 frame. */
6314 window = Fnext_window (selected_window, Qlambda, Qnil); 6316 window = Fnext_window (selected_window, Qlambda, Qnil);
6315 6317
6316 if (EQ (window, selected_window)) 6318 if (EQ (window, selected_window))
@@ -8268,6 +8270,14 @@ is displayed in the `mode-line' face. */);
8268 doc: /* If this is a live buffer, \\[scroll-other-window] should scroll its window. */); 8270 doc: /* If this is a live buffer, \\[scroll-other-window] should scroll its window. */);
8269 Vother_window_scroll_buffer = Qnil; 8271 Vother_window_scroll_buffer = Qnil;
8270 8272
8273 DEFVAR_LISP ("other-window-scroll-default", Vother_window_scroll_default,
8274 doc: /* Function that provides the window to scroll by \\[scroll-other-window].
8275The function `other-window-for-scrolling' first tries to use
8276`minibuffer-scroll-window' and `other-window-scroll-buffer'.
8277But when both are nil, then by default it uses a neighboring window.
8278This variable is intended to get another default instead of `next-window'. */);
8279 Vother_window_scroll_default = Qnil;
8280
8271 DEFVAR_BOOL ("auto-window-vscroll", auto_window_vscroll_p, 8281 DEFVAR_BOOL ("auto-window-vscroll", auto_window_vscroll_p,
8272 doc: /* Non-nil means to automatically adjust `window-vscroll' to view tall lines. */); 8282 doc: /* Non-nil means to automatically adjust `window-vscroll' to view tall lines. */);
8273 auto_window_vscroll_p = true; 8283 auto_window_vscroll_p = true;