From: Juri Linkov <juri@linkov.net>
To: martin rudalics <rudalics@gmx.at>
Cc: 51210@debbugs.gnu.org
Subject: bug#51210: Customizable other-window-for-scrolling
Date: Wed, 29 Dec 2021 19:31:13 +0200 [thread overview]
Message-ID: <861r1v1foe.fsf@mail.linkov.net> (raw)
In-Reply-To: <d1968d79-1954-29ed-9d04-9dae38954d9b@gmx.at> (martin rudalics's message of "Thu, 14 Oct 2021 19:47:36 +0200")
[-- Attachment #1: Type: text/plain, Size: 581 bytes --]
>> Maybe like there is a variable other-window-scroll-buffer,
>> it would be nice to add a new user option
>> other-window-for-scrolling-function that will return
>> a window for scrolling. It could provide a choise list that
>> includes a function that returns the most-recently-used window.
>
> Maybe a variable 'other-window-scroll-window' whose value could be a
> function to get that window.
Since there is already the word "window" in the function name,
maybe better would be 'other-window-scroll-default' that hints
that it overrides the default that is the next window:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: other-window-scroll-default.patch --]
[-- Type: text/x-diff, Size: 1650 bytes --]
diff --git a/src/window.c b/src/window.c
index e801ff821f..d06a706e58 100644
--- a/src/window.c
+++ b/src/window.c
@@ -6307,10 +6307,12 @@ DEFUN ("other-window-for-scrolling", Fother_window_for_scrolling, Sother_window_
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))
@@ -8268,6 +8270,15 @@ syms_of_window (void)
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 provide another default instead of
+a neighboring 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;
next prev parent reply other threads:[~2021-12-29 17:31 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-14 17:19 bug#51210: Customizable other-window-for-scrolling Juri Linkov
2021-10-14 17:31 ` Eli Zaretskii
2021-10-14 17:58 ` Juri Linkov
2021-10-14 18:06 ` Eli Zaretskii
2021-10-14 18:25 ` Juri Linkov
2021-10-14 18:37 ` Eli Zaretskii
2021-10-14 18:45 ` Juri Linkov
2021-10-14 18:52 ` Eli Zaretskii
2021-10-14 17:37 ` jakanakaevangeli
2021-10-14 17:59 ` Juri Linkov
2021-10-14 18:04 ` Eli Zaretskii
2021-10-14 17:47 ` martin rudalics
2021-10-14 18:00 ` Juri Linkov
2021-12-29 17:31 ` Juri Linkov [this message]
2021-12-31 9:11 ` martin rudalics
2022-01-04 8:38 ` Juri Linkov
2022-01-04 10:27 ` martin rudalics
2022-01-04 17:37 ` Juri Linkov
2022-01-11 17:29 ` Juri Linkov
2022-01-11 18:40 ` Juri Linkov
2022-01-11 18:58 ` Juri Linkov
2022-01-11 20:08 ` Eli Zaretskii
2022-01-12 18:04 ` Juri Linkov
2022-01-12 19:29 ` Eli Zaretskii
2022-01-12 19:45 ` Juri Linkov
2022-01-12 19:51 ` Eli Zaretskii
2022-01-12 19:59 ` Juri Linkov
2022-01-12 20:41 ` Eli Zaretskii
2022-01-17 8:44 ` Juri Linkov
2022-01-17 12:33 ` Eli Zaretskii
2022-01-24 19:42 ` Juri Linkov
2022-01-24 19:53 ` Eli Zaretskii
2022-01-27 17:40 ` Juri Linkov
2022-01-28 13:45 ` Eli Zaretskii
2022-01-29 18:53 ` Juri Linkov
2022-01-04 13:13 ` Eli Zaretskii
2022-01-04 17:40 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=861r1v1foe.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=51210@debbugs.gnu.org \
--cc=rudalics@gmx.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.