[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Improve other-window-for-scrolling documentation
From: |
Karthik Chikmagalur |
Subject: |
Improve other-window-for-scrolling documentation |
Date: |
Sun, 24 Mar 2024 18:13:02 -0700 |
On Emacs 29.2: The documentation of other-window-for-scrolling makes no
mention of other-window-scroll-default. Additionally, it is also
confusing. Reproduced here:
Return the other window for "other window scroll" commands.
If in the minibuffer, ‘minibuffer-scroll-window’ if non-nil
specifies the window.
Otherwise, if ‘other-window-scroll-buffer’ is non-nil, a window
showing that buffer is used, popping the buffer up if necessary.
Finally, look for a neighboring window on the selected frame,
followed by all visible frames on the current terminal.
Looking at the source in src/window.c, the actual logic is as follows:
1. If in the minibuffer and minibuffer-scroll-window is non-nil, return
it.
2. If other-window-scroll-buffer is set to a live buffer, return it.
3. If other-window-scroll-default is set to a function, return the
result of calling it.
4. Otherwise, return a neighboring window on the same frame (if
possible).
5. Otherwise, resturn a window on another visible frame in the current
terminal (if possible).
6. Otherwise raise an error.
Based on this, I suggest the following documentation:
Return the other window for "other window scroll" commands.
If in the minibuffer, `minibuffer-scroll-window' if non-nil
specifies the window.
Otherwise, if `other-window-scroll-buffer' is non-nil, a window
showing that buffer is used, popping the buffer up if necessary.
Otherwise, if `other-window-scroll-default' is set to a function,
return the result of calling it.
Finally, look for a neighboring window on the selected frame,
followed by all visible frames on the current terminal.
Thanks,
Karthik
- Improve other-window-for-scrolling documentation,
Karthik Chikmagalur <=