diff options
| author | Martin Rudalics | 2019-06-03 10:36:00 +0200 |
|---|---|---|
| committer | Martin Rudalics | 2019-06-03 10:36:00 +0200 |
| commit | c153250adb1c4881cd775623028e793abea7b5fa (patch) | |
| tree | 6246a1bd0f8e273fa407e44680ab903ee3821278 /doc | |
| parent | fb314ba3ad3619123b3d41b1dd65dcc569ad1e51 (diff) | |
| download | emacs-c153250adb1c4881cd775623028e793abea7b5fa.tar.gz emacs-c153250adb1c4881cd775623028e793abea7b5fa.zip | |
Try to improve text on atomic windows in Elisp manual
* doc/lispref/windows.texi (Deleting Windows): Mention how
'delete-window' and 'delete-other-windows' handle atomic
windows. Minor rewrite.
(Quitting Windows): Mention how 'quit-restore-window' handles
atomic windows and that it tries to avoid raising an error.
(Atomic Windows): Tell how to dissolve atomic windows.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/windows.texi | 83 |
1 files changed, 49 insertions, 34 deletions
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index f4395c12d26..b2dd3d99583 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi | |||
| @@ -1307,8 +1307,10 @@ the selected window. | |||
| 1307 | 1307 | ||
| 1308 | If deleting the window would leave no more windows in the window tree | 1308 | If deleting the window would leave no more windows in the window tree |
| 1309 | (e.g., if it is the only live window in the frame) or all remaining | 1309 | (e.g., if it is the only live window in the frame) or all remaining |
| 1310 | windows on @var{window}'s frame are side windows (@pxref{Side Windows}), | 1310 | windows on @var{window}'s frame are side windows (@pxref{Side |
| 1311 | an error is signaled. | 1311 | Windows}), an error is signaled. If @var{window} is part of an atomic |
| 1312 | window (@pxref{Atomic Windows}), this function tries to delete the | ||
| 1313 | root of that atomic window instead. | ||
| 1312 | 1314 | ||
| 1313 | By default, the space taken up by @var{window} is given to one of its | 1315 | By default, the space taken up by @var{window} is given to one of its |
| 1314 | adjacent sibling windows, if any. However, if the variable | 1316 | adjacent sibling windows, if any. However, if the variable |
| @@ -1327,10 +1329,13 @@ Parameters}. | |||
| 1327 | @end deffn | 1329 | @end deffn |
| 1328 | 1330 | ||
| 1329 | @deffn Command delete-other-windows &optional window | 1331 | @deffn Command delete-other-windows &optional window |
| 1330 | This function makes @var{window} fill its frame, deleting other windows | 1332 | This function makes @var{window} fill its frame, deleting other |
| 1331 | as necessary. If @var{window} is omitted or @code{nil}, it defaults to | 1333 | windows as necessary. If @var{window} is omitted or @code{nil}, it |
| 1332 | the selected window. An error is signaled if @var{window} is a side | 1334 | defaults to the selected window. An error is signaled if @var{window} |
| 1333 | window (@pxref{Side Windows}). The return value is @code{nil}. | 1335 | is a side window (@pxref{Side Windows}). If @var{window} is part of |
| 1336 | an atomic window (@pxref{Atomic Windows}), this function tries to make | ||
| 1337 | the root of that atomic window fill its frame. The return | ||
| 1338 | value is @code{nil}. | ||
| 1334 | 1339 | ||
| 1335 | The behavior of this function may be altered by the window parameters of | 1340 | The behavior of this function may be altered by the window parameters of |
| 1336 | @var{window}, so long as the variable @code{ignore-window-parameters} is | 1341 | @var{window}, so long as the variable @code{ignore-window-parameters} is |
| @@ -3909,9 +3914,8 @@ described next to deal with the window and its buffer. | |||
| 3909 | This function handles @var{window} and its buffer after quitting. The | 3914 | This function handles @var{window} and its buffer after quitting. The |
| 3910 | optional argument @var{window} must be a live window and defaults to | 3915 | optional argument @var{window} must be a live window and defaults to |
| 3911 | the selected one. The function's behavior is determined by the four | 3916 | the selected one. The function's behavior is determined by the four |
| 3912 | elements of the list specified by the @code{quit-restore} window | 3917 | elements of the list specified by @var{window}'s @code{quit-restore} |
| 3913 | parameter (@pxref{Window Parameters}), which is set to @code{nil} | 3918 | parameter (@pxref{Window Parameters}). |
| 3914 | afterwards. | ||
| 3915 | 3919 | ||
| 3916 | The first element of the @code{quit-restore} parameter is one of the | 3920 | The first element of the @code{quit-restore} parameter is one of the |
| 3917 | symbols @code{window}, meaning that the window has been specially | 3921 | symbols @code{window}, meaning that the window has been specially |
| @@ -3920,35 +3924,40 @@ been created; @code{same}, the window has only ever displayed this | |||
| 3920 | buffer; or @code{other}, the window showed another buffer before. | 3924 | buffer; or @code{other}, the window showed another buffer before. |
| 3921 | @code{frame} and @code{window} affect how the window is quit, while | 3925 | @code{frame} and @code{window} affect how the window is quit, while |
| 3922 | @code{same} and @code{other} affect the redisplay of buffers | 3926 | @code{same} and @code{other} affect the redisplay of buffers |
| 3923 | previously shown in this window. | 3927 | previously shown in @var{window}. |
| 3924 | 3928 | ||
| 3925 | The second element is either one of the symbols @code{window} or | 3929 | The parameter's second element is either one of the symbols |
| 3926 | @code{frame}, or a list whose elements are the buffer shown in the | 3930 | @code{window} or @code{frame}, or a list whose elements are the buffer |
| 3927 | window before, that buffer's window start and window point positions, | 3931 | shown in @var{window} before, that buffer's window start and window |
| 3928 | and the window's height at that time. If that buffer is still live | 3932 | point positions, and @var{window}'s height at that time. If that |
| 3929 | when the window is quit, then the function @code{quit-restore-window} | 3933 | buffer is still live when @var{window} is quit, then this function may |
| 3930 | reuses the window to display the buffer. | 3934 | reuse @var{window} to display it. |
| 3931 | 3935 | ||
| 3932 | The third element is the window selected at the time the parameter was | 3936 | 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 | 3937 | created. If this function deletes @var{window}, it subsequently tries |
| 3934 | it as argument, it then tries to reselect this window. | 3938 | to reselect the window named by that element. |
| 3935 | 3939 | ||
| 3936 | The fourth element is the buffer whose display caused the creation of | 3940 | The fourth element is the buffer whose display caused the creation of |
| 3937 | this parameter. @code{quit-restore-window} deletes the specified window | 3941 | this parameter. This function may delete @var{window} if and only if |
| 3938 | only if it still shows that buffer. | 3942 | it still shows that buffer. |
| 3939 | 3943 | ||
| 3940 | The window is deleted entirely if: 1) the first element of the | 3944 | This function will try to delete @var{window} if and only if (1) the |
| 3941 | @code{quit-restore} parameter is one of 'window or 'frame, 2) the | 3945 | first element of its @code{quit-restore} parameter is either |
| 3942 | window has no history of previously-displayed buffers, and 3) the | 3946 | @code{window} or @code{frame}, (2) the window has no history of |
| 3943 | displayed buffer matches the one in the fourth element of the | 3947 | previously-displayed buffers and (3) the fourth element of the |
| 3944 | @code{quit-restore} parameter. If @var{window} is the | 3948 | @code{quit-restore} parameter specifies the buffer currently displayed |
| 3945 | only window on its frame and there are other frames on the frame's | 3949 | in @var{window}. If @var{window} is part of an atomic window |
| 3946 | terminal, the value of the optional argument @var{bury-or-kill} | 3950 | (@pxref{Atomic Windows}), it will try to delete the root of that |
| 3947 | determines how to proceed with the window. If @var{bury-or-kill} | 3951 | atomic window instead. In either case, it tries to avoid signaling an |
| 3948 | equals @code{kill}, the frame is deleted unconditionally. Otherwise, | 3952 | error when @var{window} cannot be deleted. |
| 3949 | the fate of the frame is determined by calling | 3953 | |
| 3950 | @code{frame-auto-hide-function} (see below) with that frame as sole | 3954 | If @var{window} shall be deleted, is the only window on its frame and |
| 3951 | argument. | 3955 | there are other frames on that frame's terminal, the value of the |
| 3956 | optional argument @var{bury-or-kill} determines how to proceed with | ||
| 3957 | the window. If @var{bury-or-kill} equals @code{kill}, the frame is | ||
| 3958 | deleted unconditionally. Otherwise, the fate of the frame is | ||
| 3959 | determined by calling @code{frame-auto-hide-function} (see below) with | ||
| 3960 | that frame as sole argument. | ||
| 3952 | 3961 | ||
| 3953 | If the third element of the @code{quit-restore} parameter is a list of | 3962 | If the third element of the @code{quit-restore} parameter is a list of |
| 3954 | buffer, window start (@pxref{Window Start and End}), and point | 3963 | buffer, window start (@pxref{Window Start and End}), and point |
| @@ -3959,7 +3968,8 @@ try to restore the original height of @var{window}. | |||
| 3959 | 3968 | ||
| 3960 | Otherwise, if @var{window} was previously used for displaying other | 3969 | Otherwise, if @var{window} was previously used for displaying other |
| 3961 | buffers (@pxref{Window History}), the most recent buffer in that | 3970 | buffers (@pxref{Window History}), the most recent buffer in that |
| 3962 | history will be displayed. | 3971 | history will be displayed. In either case, if @var{window} is not |
| 3972 | deleted, its @code{quit-restore} parameter is reset to @code{nil}. | ||
| 3963 | 3973 | ||
| 3964 | The optional argument @var{bury-or-kill} specifies how to deal with | 3974 | The optional argument @var{bury-or-kill} specifies how to deal with |
| 3965 | @var{window}'s buffer. The following values are handled: | 3975 | @var{window}'s buffer. The following values are handled: |
| @@ -4440,6 +4450,11 @@ parameter assigned by @code{display-buffer-in-atom-window}. Further | |||
| 4440 | parameters have to be set by the application explicitly via a | 4450 | parameters have to be set by the application explicitly via a |
| 4441 | @code{window-parameters} entry in @var{alist}. | 4451 | @code{window-parameters} entry in @var{alist}. |
| 4442 | 4452 | ||
| 4453 | Atomic windows automatically cease to exist when one of their | ||
| 4454 | constituents gets deleted. To dissolve an atomic window manually, | ||
| 4455 | reset the @code{window-atom} parameter of its constituents---the root | ||
| 4456 | of the atomic window and all its descendants. | ||
| 4457 | |||
| 4443 | The following code snippet, when applied to a single-window frame, | 4458 | The following code snippet, when applied to a single-window frame, |
| 4444 | first splits the selected window and makes the selected and the new | 4459 | first splits the selected window and makes the selected and the new |
| 4445 | window constituents of an atomic window with their parent as root. It | 4460 | window constituents of an atomic window with their parent as root. It |