diff options
| author | Basil L. Contovounesios | 2018-05-03 13:52:20 +0100 |
|---|---|---|
| committer | Noam Postavsky | 2018-05-10 19:04:11 -0400 |
| commit | d5cf1b3160a5510198fc5dd4e28b3eca7aadf71b (patch) | |
| tree | 557d7cbce4e09fdde16e484967a41da632ae6917 | |
| parent | dc9188ada522743dd9c9a6658570d9c4973be432 (diff) | |
| download | emacs-d5cf1b3160a5510198fc5dd4e28b3eca7aadf71b.tar.gz emacs-d5cf1b3160a5510198fc5dd4e28b3eca7aadf71b.zip | |
Improve documentation for "other window" scrolling
* doc/emacs/windows.texi (Other Window):
* doc/lispref/windows.texi (Textual Scrolling):
Document scroll-other-window-down.
* doc/lispref/minibuf.texi (Minibuffer Misc):
Cross-reference minibuffer-scroll-window with Textual Scrolling.
* src/window.c (Fother_window_for_scrolling):
Clarify how "other window" is determined in docstring.
(Fscroll_other_window): Simplify docstring, pointing to that of
Fother_window_for_scrolling. (bug#30207)
| -rw-r--r-- | doc/emacs/windows.texi | 19 | ||||
| -rw-r--r-- | doc/lispref/minibuf.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/windows.texi | 7 | ||||
| -rw-r--r-- | src/window.c | 27 |
4 files changed, 34 insertions, 21 deletions
diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi index 809363305fb..17ce4ad04d3 100644 --- a/doc/emacs/windows.texi +++ b/doc/emacs/windows.texi | |||
| @@ -157,7 +157,9 @@ this option is @code{nil}. | |||
| 157 | @item C-x o | 157 | @item C-x o |
| 158 | Select another window (@code{other-window}). | 158 | Select another window (@code{other-window}). |
| 159 | @item C-M-v | 159 | @item C-M-v |
| 160 | Scroll the next window (@code{scroll-other-window}). | 160 | Scroll the next window upward (@code{scroll-other-window}). |
| 161 | @item C-M-S-v | ||
| 162 | Scroll the next window downward (@code{scroll-other-window-down}). | ||
| 161 | @item mouse-1 | 163 | @item mouse-1 |
| 162 | @kbd{mouse-1}, in the text area of a window, selects the window and | 164 | @kbd{mouse-1}, in the text area of a window, selects the window and |
| 163 | moves point to the position clicked. Clicking in the mode line | 165 | moves point to the position clicked. Clicking in the mode line |
| @@ -181,13 +183,18 @@ back and finish supplying the minibuffer argument that is requested. | |||
| 181 | 183 | ||
| 182 | @kindex C-M-v | 184 | @kindex C-M-v |
| 183 | @findex scroll-other-window | 185 | @findex scroll-other-window |
| 186 | @kindex C-M-S-v | ||
| 187 | @findex scroll-other-window-down | ||
| 184 | The usual scrolling commands (@pxref{Display}) apply to the selected | 188 | The usual scrolling commands (@pxref{Display}) apply to the selected |
| 185 | window only, but there is one command to scroll the next window. | 189 | window only, but there are also commands to scroll the next window. |
| 186 | @kbd{C-M-v} (@code{scroll-other-window}) scrolls the window that | 190 | @kbd{C-M-v} (@code{scroll-other-window}) scrolls the window that |
| 187 | @kbd{C-x o} would select. It takes arguments, positive and negative, | 191 | @kbd{C-x o} would select. In other respects, the command behaves like |
| 188 | like @kbd{C-v}. (In the minibuffer, @kbd{C-M-v} scrolls the help | 192 | @kbd{C-v}; both move the buffer text upward relative to the window, and |
| 189 | window associated with the minibuffer, if any, rather than the next | 193 | take positive and negative arguments. (In the minibuffer, @kbd{C-M-v} |
| 190 | window in the standard cyclic order; @pxref{Minibuffer Edit}.) | 194 | scrolls the help window associated with the minibuffer, if any, rather |
| 195 | than the next window in the standard cyclic order; @pxref{Minibuffer | ||
| 196 | Edit}.) @kbd{C-M-S-v} (@code{scroll-other-window-down}) scrolls the | ||
| 197 | next window downward in a similar way. | ||
| 191 | 198 | ||
| 192 | @vindex mouse-autoselect-window | 199 | @vindex mouse-autoselect-window |
| 193 | If you set @code{mouse-autoselect-window} to a non-@code{nil} value, | 200 | If you set @code{mouse-autoselect-window} to a non-@code{nil} value, |
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index 338e03ef74d..889b64af8ae 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi | |||
| @@ -2462,7 +2462,7 @@ locally inside the minibuffer (@pxref{Help Functions}). | |||
| 2462 | @anchor{Definition of minibuffer-scroll-window} | 2462 | @anchor{Definition of minibuffer-scroll-window} |
| 2463 | If the value of this variable is non-@code{nil}, it should be a window | 2463 | If the value of this variable is non-@code{nil}, it should be a window |
| 2464 | object. When the function @code{scroll-other-window} is called in the | 2464 | object. When the function @code{scroll-other-window} is called in the |
| 2465 | minibuffer, it scrolls this window. | 2465 | minibuffer, it scrolls this window (@pxref{Textual Scrolling}). |
| 2466 | @end defvar | 2466 | @end defvar |
| 2467 | 2467 | ||
| 2468 | @defun minibuffer-selected-window | 2468 | @defun minibuffer-selected-window |
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index f5de2fc90ba..315ffd4f484 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi | |||
| @@ -4028,6 +4028,13 @@ line reappears after the echo area momentarily displays the message | |||
| 4028 | @samp{End of buffer}. | 4028 | @samp{End of buffer}. |
| 4029 | @end deffn | 4029 | @end deffn |
| 4030 | 4030 | ||
| 4031 | @deffn Command scroll-other-window-down &optional count | ||
| 4032 | This function scrolls the text in another window downward @var{count} | ||
| 4033 | lines. Negative values of @var{count}, or @code{nil}, are handled as | ||
| 4034 | in @code{scroll-down}. In other respects, it behaves the same way as | ||
| 4035 | @code{scroll-other-window} does. | ||
| 4036 | @end deffn | ||
| 4037 | |||
| 4031 | @defvar other-window-scroll-buffer | 4038 | @defvar other-window-scroll-buffer |
| 4032 | If this variable is non-@code{nil}, it tells @code{scroll-other-window} | 4039 | If this variable is non-@code{nil}, it tells @code{scroll-other-window} |
| 4033 | which buffer's window to scroll. | 4040 | which buffer's window to scroll. |
diff --git a/src/window.c b/src/window.c index 59c94220294..af317674bb6 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -5696,11 +5696,12 @@ When calling from a program, supply as argument a number, nil, or `-'. */) | |||
| 5696 | 5696 | ||
| 5697 | DEFUN ("other-window-for-scrolling", Fother_window_for_scrolling, Sother_window_for_scrolling, 0, 0, 0, | 5697 | DEFUN ("other-window-for-scrolling", Fother_window_for_scrolling, Sother_window_for_scrolling, 0, 0, 0, |
| 5698 | doc: /* Return the other window for \"other window scroll\" commands. | 5698 | doc: /* Return the other window for \"other window scroll\" commands. |
| 5699 | If `other-window-scroll-buffer' is non-nil, a window | ||
| 5700 | showing that buffer is used. | ||
| 5701 | If in the minibuffer, `minibuffer-scroll-window' if non-nil | 5699 | If in the minibuffer, `minibuffer-scroll-window' if non-nil |
| 5702 | specifies the window. This takes precedence over | 5700 | specifies the window. |
| 5703 | `other-window-scroll-buffer'. */) | 5701 | Otherwise, if `other-window-scroll-buffer' is non-nil, a window |
| 5702 | showing that buffer is used, popping the buffer up if necessary. | ||
| 5703 | Finally, look for a neighboring window on the selected frame, | ||
| 5704 | followed by all visible frames on the current terminal. */) | ||
| 5704 | (void) | 5705 | (void) |
| 5705 | { | 5706 | { |
| 5706 | Lisp_Object window; | 5707 | Lisp_Object window; |
| @@ -5739,16 +5740,14 @@ specifies the window. This takes precedence over | |||
| 5739 | DEFUN ("scroll-other-window", Fscroll_other_window, Sscroll_other_window, 0, 1, "P", | 5740 | DEFUN ("scroll-other-window", Fscroll_other_window, Sscroll_other_window, 0, 1, "P", |
| 5740 | doc: /* Scroll next window upward ARG lines; or near full screen if no ARG. | 5741 | doc: /* Scroll next window upward ARG lines; or near full screen if no ARG. |
| 5741 | A near full screen is `next-screen-context-lines' less than a full screen. | 5742 | A near full screen is `next-screen-context-lines' less than a full screen. |
| 5742 | The next window is the one below the current one; or the one at the top | 5743 | Negative ARG means scroll downward. If ARG is the atom `-', scroll |
| 5743 | if the current one is at the bottom. Negative ARG means scroll downward. | 5744 | downward by nearly full screen. When calling from a program, supply |
| 5744 | If ARG is the atom `-', scroll downward by nearly full screen. | 5745 | as argument a number, nil, or `-'. |
| 5745 | When calling from a program, supply as argument a number, nil, or `-'. | 5746 | |
| 5746 | 5747 | The next window is usually the one below the current one; | |
| 5747 | If `other-window-scroll-buffer' is non-nil, scroll the window | 5748 | or the one at the top if the current one is at the bottom. |
| 5748 | showing that buffer, popping the buffer up if necessary. | 5749 | It is determined by the function `other-window-for-scrolling', |
| 5749 | If in the minibuffer, `minibuffer-scroll-window' if non-nil | 5750 | which see. */) |
| 5750 | specifies the window to scroll. This takes precedence over | ||
| 5751 | `other-window-scroll-buffer'. */) | ||
| 5752 | (Lisp_Object arg) | 5751 | (Lisp_Object arg) |
| 5753 | { | 5752 | { |
| 5754 | Lisp_Object window; | 5753 | Lisp_Object window; |