diff options
| author | Eli Zaretskii | 2019-04-06 11:04:37 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2019-04-06 11:04:37 +0300 |
| commit | 92ce2dd48bd3f31b848f0258ad79af01a7197b44 (patch) | |
| tree | 6c831f53db132ddf29f5c566fc8d3f09abd9d2dc /doc | |
| parent | 6dc42c562c5ae3ca5a7d7eb4223cd82554e3cfad (diff) | |
| download | emacs-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.texi | 93 |
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 | ||
| 1958 | This function does not select a window that has a non-@code{nil} | 1958 | This 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}), |
| 1960 | provided that @code{ignore-window-parameters} is @code{nil}. | ||
| 1961 | |||
| 1962 | If the @code{other-window} parameter of the selected window is a | ||
| 1963 | function, and @code{ignore-window-parameters} is @code{nil}, that | ||
| 1964 | function 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. | |||
| 3903 | This function handles @var{window} and its buffer after quitting. The | 3909 | This function handles @var{window} and its buffer after quitting. The |
| 3904 | optional argument @var{window} must be a live window and defaults to | 3910 | optional argument @var{window} must be a live window and defaults to |
| 3905 | the selected one. The function's behavior is determined by the four | 3911 | the selected one. The function's behavior is determined by the four |
| 3906 | elements of the @code{quit-restore} window parameter (@pxref{Window | 3912 | elements of the list specified by the @code{quit-restore} window |
| 3907 | Parameters}), which is set to @code{nil} afterwards. | 3913 | parameter (@pxref{Window Parameters}), which is set to @code{nil} |
| 3914 | afterwards. | ||
| 3915 | |||
| 3916 | The first element of the @code{quit-restore} parameter is one of the | ||
| 3917 | symbols @code{window}, meaning that the window has been specially | ||
| 3918 | created by @code{display-buffer}; @code{frame}, a separate frame has | ||
| 3919 | been created; @code{same}, the window has only ever displayed this | ||
| 3920 | buffer; 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 | ||
| 3923 | previously shown in this window. | ||
| 3924 | |||
| 3925 | The 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 | ||
| 3927 | window before, that buffer's window start and window point positions, | ||
| 3928 | and the window's height at that time. If that buffer is still live | ||
| 3929 | when the window is quit, then the function @code{quit-restore-window} | ||
| 3930 | reuses the window to display the buffer. | ||
| 3931 | |||
| 3932 | The third element is the window selected at the time the parameter was | ||
| 3933 | created. If @code{quit-restore-window} deletes the window passed to | ||
| 3934 | it as argument, it then tries to reselect this window. | ||
| 3935 | |||
| 3936 | The fourth element is the buffer whose display caused the creation of | ||
| 3937 | this parameter. @code{quit-restore-window} deletes the specified window | ||
| 3938 | only if it still shows that buffer. | ||
| 3908 | 3939 | ||
| 3909 | The window is deleted entirely if: 1) the first element of the | 3940 | The 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 | ||
| 5757 | This section describes how window parameters can be used to associate | 5788 | This section describes the window parameters that can be used to |
| 5758 | additional information with windows. | 5789 | associate additional information with windows. |
| 5759 | 5790 | ||
| 5760 | @defun window-parameter window parameter | 5791 | @defun window-parameter window parameter |
| 5761 | This function returns @var{window}'s value for @var{parameter}. The | 5792 | This 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} |
| 5889 | This parameter is installed by the buffer display functions | 5920 | This 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 |
| 5923 | description of @code{quit-restore-window} in @ref{Quitting Windows} | ||
| 5924 | for details. | ||
| 5892 | 5925 | ||
| 5893 | The first element is one of the symbols @code{window}, meaning that | 5926 | @item window-side |
| 5894 | the 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 | ||
| 5896 | window has only ever displayed this buffer; or @code{other}, the | ||
| 5897 | window showed another buffer before. @code{frame} and @code{window} | ||
| 5898 | affect how the window is quit, while @code{same} and @code{other} | ||
| 5899 | affect the redisplay of buffers previously shown in this window. | ||
| 5900 | |||
| 5901 | The 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 | ||
| 5903 | window before, that buffer's window start and window point positions, | ||
| 5904 | and the window's height at that time. If that buffer is still live | ||
| 5905 | when the window is quit, then the function @code{quit-restore-window} | ||
| 5906 | reuses the window to display the buffer. | ||
| 5907 | |||
| 5908 | The third element is the window selected at the time the parameter was | ||
| 5909 | created. If @code{quit-restore-window} deletes the window passed to | ||
| 5910 | it as argument, it then tries to reselect this window. | ||
| 5911 | |||
| 5912 | The fourth element is the buffer whose display caused the creation of | ||
| 5913 | this parameter. @code{quit-restore-window} deletes the specified window | ||
| 5914 | only if it still shows that buffer. | ||
| 5915 | |||
| 5916 | See the description of @code{quit-restore-window} in @ref{Quitting | ||
| 5917 | Windows} 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} |
| 5922 | These parameters are used for implementing side windows (@pxref{Side | 5930 | These parameters are used internally for implementing side windows |
| 5923 | Windows}). | 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} |
| 5927 | This parameter is used for implementing atomic windows, see @ref{Atomic | 5935 | This parameter is used internally for implementing atomic windows, see |
| 5928 | Windows}. | 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} |
| 5950 | The value of this parameter is a cons cell whose @sc{car} and @sc{cdr}, | 5958 | The value of this parameter is a cons cell whose @sc{car} and |
| 5951 | if 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) |
| 5952 | and right margin of this window. When present, Emacs will use these | 5960 | for the left and right margin of this window (@pxref{Display Margins}. |
| 5953 | values instead of the actual margin widths for determining whether a | 5961 | When present, Emacs will use these values instead of the actual margin |
| 5954 | window can be split or shrunk horizontally. | 5962 | widths for determining whether a window can be split or shrunk |
| 5963 | horizontally. | ||
| 5955 | 5964 | ||
| 5956 | Emacs never auto-adjusts the margins of any window after splitting or | 5965 | Emacs never auto-adjusts the margins of any window after splitting or |
| 5957 | resizing it. It is the sole responsibility of any application setting | 5966 | resizing it. It is the sole responsibility of any application setting |