aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorEli Zaretskii2019-04-06 11:04:37 +0300
committerEli Zaretskii2019-04-06 11:04:37 +0300
commit92ce2dd48bd3f31b848f0258ad79af01a7197b44 (patch)
tree6c831f53db132ddf29f5c566fc8d3f09abd9d2dc /doc
parent6dc42c562c5ae3ca5a7d7eb4223cd82554e3cfad (diff)
downloademacs-92ce2dd48bd3f31b848f0258ad79af01a7197b44.tar.gz
emacs-92ce2dd48bd3f31b848f0258ad79af01a7197b44.zip
Improve documentation of window parameters
* doc/lispref/windows.texi (Cyclic Window Ordering): Describe the effect of the 'other-window' window parameter. (Window Parameters): Improve the descriptions of window parameters. Move the detailed description of the 'quit-restore' window parameter from here... (Quitting Windows): ...to here. (Bug#35063)
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/windows.texi93
1 files changed, 51 insertions, 42 deletions
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 7f0fcffaaf1..27940e12c79 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -1956,7 +1956,13 @@ The optional argument @var{all-frames} has the same meaning as in
1956@code{next-window}. 1956@code{next-window}.
1957 1957
1958This function does not select a window that has a non-@code{nil} 1958This function does not select a window that has a non-@code{nil}
1959@code{no-other-window} window parameter (@pxref{Window Parameters}). 1959@code{no-other-window} window parameter (@pxref{Window Parameters}),
1960provided that @code{ignore-window-parameters} is @code{nil}.
1961
1962If the @code{other-window} parameter of the selected window is a
1963function, and @code{ignore-window-parameters} is @code{nil}, that
1964function will be called with the arguments @var{count} and
1965@var{all-frames} instead of the normal operation of this function.
1960@end deffn 1966@end deffn
1961 1967
1962@defun walk-windows fun &optional minibuf all-frames 1968@defun walk-windows fun &optional minibuf all-frames
@@ -3903,8 +3909,33 @@ described next to deal with the window and its buffer.
3903This function handles @var{window} and its buffer after quitting. The 3909This function handles @var{window} and its buffer after quitting. The
3904optional argument @var{window} must be a live window and defaults to 3910optional argument @var{window} must be a live window and defaults to
3905the selected one. The function's behavior is determined by the four 3911the selected one. The function's behavior is determined by the four
3906elements of the @code{quit-restore} window parameter (@pxref{Window 3912elements of the list specified by the @code{quit-restore} window
3907Parameters}), which is set to @code{nil} afterwards. 3913parameter (@pxref{Window Parameters}), which is set to @code{nil}
3914afterwards.
3915
3916The first element of the @code{quit-restore} parameter is one of the
3917symbols @code{window}, meaning that the window has been specially
3918created by @code{display-buffer}; @code{frame}, a separate frame has
3919been created; @code{same}, the window has only ever displayed this
3920buffer; or @code{other}, the window showed another buffer before.
3921@code{frame} and @code{window} affect how the window is quit, while
3922@code{same} and @code{other} affect the redisplay of buffers
3923previously shown in this window.
3924
3925The second element is either one of the symbols @code{window} or
3926@code{frame}, or a list whose elements are the buffer shown in the
3927window before, that buffer's window start and window point positions,
3928and the window's height at that time. If that buffer is still live
3929when the window is quit, then the function @code{quit-restore-window}
3930reuses the window to display the buffer.
3931
3932The third element is the window selected at the time the parameter was
3933created. If @code{quit-restore-window} deletes the window passed to
3934it as argument, it then tries to reselect this window.
3935
3936The fourth element is the buffer whose display caused the creation of
3937this parameter. @code{quit-restore-window} deletes the specified window
3938only if it still shows that buffer.
3908 3939
3909The window is deleted entirely if: 1) the first element of the 3940The window is deleted entirely if: 1) the first element of the
3910@code{quit-restore} parameter is one of 'window or 'frame, 2) the 3941@code{quit-restore} parameter is one of 'window or 'frame, 2) the
@@ -5754,8 +5785,8 @@ and heights, if possible. Frames are not resized by this function.
5754@section Window Parameters 5785@section Window Parameters
5755@cindex window parameters 5786@cindex window parameters
5756 5787
5757This section describes how window parameters can be used to associate 5788This section describes the window parameters that can be used to
5758additional information with windows. 5789associate additional information with windows.
5759 5790
5760@defun window-parameter window parameter 5791@defun window-parameter window parameter
5761This function returns @var{window}'s value for @var{parameter}. The 5792This function returns @var{window}'s value for @var{parameter}. The
@@ -5888,44 +5919,21 @@ parameter is installed and updated by the function
5888@vindex quit-restore@r{, a window parameter} 5919@vindex quit-restore@r{, a window parameter}
5889This parameter is installed by the buffer display functions 5920This parameter is installed by the buffer display functions
5890(@pxref{Choosing Window}) and consulted by @code{quit-restore-window} 5921(@pxref{Choosing Window}) and consulted by @code{quit-restore-window}
5891(@pxref{Quitting Windows}). It contains four elements: 5922(@pxref{Quitting Windows}). It is a list of four elements, see the
5923description of @code{quit-restore-window} in @ref{Quitting Windows}
5924for details.
5892 5925
5893The first element is one of the symbols @code{window}, meaning that 5926@item window-side
5894the window has been specially created by @code{display-buffer}; 5927@itemx window-slot
5895@code{frame}, a separate frame has been created; @code{same}, the
5896window has only ever displayed this buffer; or @code{other}, the
5897window showed another buffer before. @code{frame} and @code{window}
5898affect how the window is quit, while @code{same} and @code{other}
5899affect the redisplay of buffers previously shown in this window.
5900
5901The second element is either one of the symbols @code{window} or
5902@code{frame}, or a list whose elements are the buffer shown in the
5903window before, that buffer's window start and window point positions,
5904and the window's height at that time. If that buffer is still live
5905when the window is quit, then the function @code{quit-restore-window}
5906reuses the window to display the buffer.
5907
5908The third element is the window selected at the time the parameter was
5909created. If @code{quit-restore-window} deletes the window passed to
5910it as argument, it then tries to reselect this window.
5911
5912The fourth element is the buffer whose display caused the creation of
5913this parameter. @code{quit-restore-window} deletes the specified window
5914only if it still shows that buffer.
5915
5916See the description of @code{quit-restore-window} in @ref{Quitting
5917Windows} for details.
5918
5919@item window-side window-slot
5920@vindex window-side@r{, a window parameter} 5928@vindex window-side@r{, a window parameter}
5921@vindex window-slot@r{, a window parameter} 5929@vindex window-slot@r{, a window parameter}
5922These parameters are used for implementing side windows (@pxref{Side 5930These parameters are used internally for implementing side windows
5923Windows}). 5931(@pxref{Side Windows}).
5924 5932
5925@item window-atom 5933@item window-atom
5926@vindex window-atom@r{, a window parameter} 5934@vindex window-atom@r{, a window parameter}
5927This parameter is used for implementing atomic windows, see @ref{Atomic 5935This parameter is used internally for implementing atomic windows, see
5928Windows}. 5936@ref{Atomic Windows}.
5929 5937
5930@item mode-line-format 5938@item mode-line-format
5931@vindex mode-line-format@r{, a window parameter} 5939@vindex mode-line-format@r{, a window parameter}
@@ -5947,11 +5955,12 @@ affected.
5947 5955
5948@item min-margins 5956@item min-margins
5949@vindex min-margins@r{, a window parameter} 5957@vindex min-margins@r{, a window parameter}
5950The value of this parameter is a cons cell whose @sc{car} and @sc{cdr}, 5958The value of this parameter is a cons cell whose @sc{car} and
5951if non-@code{nil}, specify the minimum values (in columns) for the left 5959@sc{cdr}, if non-@code{nil}, specify the minimum values (in columns)
5952and right margin of this window. When present, Emacs will use these 5960for the left and right margin of this window (@pxref{Display Margins}.
5953values instead of the actual margin widths for determining whether a 5961When present, Emacs will use these values instead of the actual margin
5954window can be split or shrunk horizontally. 5962widths for determining whether a window can be split or shrunk
5963horizontally.
5955 5964
5956Emacs never auto-adjusts the margins of any window after splitting or 5965Emacs never auto-adjusts the margins of any window after splitting or
5957resizing it. It is the sole responsibility of any application setting 5966resizing it. It is the sole responsibility of any application setting