aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMartin Rudalics2019-06-03 10:36:00 +0200
committerMartin Rudalics2019-06-03 10:36:00 +0200
commitc153250adb1c4881cd775623028e793abea7b5fa (patch)
tree6246a1bd0f8e273fa407e44680ab903ee3821278 /doc
parentfb314ba3ad3619123b3d41b1dd65dcc569ad1e51 (diff)
downloademacs-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.texi83
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
1308If deleting the window would leave no more windows in the window tree 1308If 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
1310windows on @var{window}'s frame are side windows (@pxref{Side Windows}), 1310windows on @var{window}'s frame are side windows (@pxref{Side
1311an error is signaled. 1311Windows}), an error is signaled. If @var{window} is part of an atomic
1312window (@pxref{Atomic Windows}), this function tries to delete the
1313root of that atomic window instead.
1312 1314
1313By default, the space taken up by @var{window} is given to one of its 1315By default, the space taken up by @var{window} is given to one of its
1314adjacent sibling windows, if any. However, if the variable 1316adjacent 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
1330This function makes @var{window} fill its frame, deleting other windows 1332This function makes @var{window} fill its frame, deleting other
1331as necessary. If @var{window} is omitted or @code{nil}, it defaults to 1333windows as necessary. If @var{window} is omitted or @code{nil}, it
1332the selected window. An error is signaled if @var{window} is a side 1334defaults to the selected window. An error is signaled if @var{window}
1333window (@pxref{Side Windows}). The return value is @code{nil}. 1335is a side window (@pxref{Side Windows}). If @var{window} is part of
1336an atomic window (@pxref{Atomic Windows}), this function tries to make
1337the root of that atomic window fill its frame. The return
1338value is @code{nil}.
1334 1339
1335The behavior of this function may be altered by the window parameters of 1340The 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.
3909This function handles @var{window} and its buffer after quitting. The 3914This function handles @var{window} and its buffer after quitting. The
3910optional argument @var{window} must be a live window and defaults to 3915optional argument @var{window} must be a live window and defaults to
3911the selected one. The function's behavior is determined by the four 3916the selected one. The function's behavior is determined by the four
3912elements of the list specified by the @code{quit-restore} window 3917elements of the list specified by @var{window}'s @code{quit-restore}
3913parameter (@pxref{Window Parameters}), which is set to @code{nil} 3918parameter (@pxref{Window Parameters}).
3914afterwards.
3915 3919
3916The first element of the @code{quit-restore} parameter is one of the 3920The first element of the @code{quit-restore} parameter is one of the
3917symbols @code{window}, meaning that the window has been specially 3921symbols @code{window}, meaning that the window has been specially
@@ -3920,35 +3924,40 @@ been created; @code{same}, the window has only ever displayed this
3920buffer; or @code{other}, the window showed another buffer before. 3924buffer; 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
3923previously shown in this window. 3927previously shown in @var{window}.
3924 3928
3925The second element is either one of the symbols @code{window} or 3929The 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
3927window before, that buffer's window start and window point positions, 3931shown in @var{window} before, that buffer's window start and window
3928and the window's height at that time. If that buffer is still live 3932point positions, and @var{window}'s height at that time. If that
3929when the window is quit, then the function @code{quit-restore-window} 3933buffer is still live when @var{window} is quit, then this function may
3930reuses the window to display the buffer. 3934reuse @var{window} to display it.
3931 3935
3932The third element is the window selected at the time the parameter was 3936The third element is the window selected at the time the parameter was
3933created. If @code{quit-restore-window} deletes the window passed to 3937created. If this function deletes @var{window}, it subsequently tries
3934it as argument, it then tries to reselect this window. 3938to reselect the window named by that element.
3935 3939
3936The fourth element is the buffer whose display caused the creation of 3940The fourth element is the buffer whose display caused the creation of
3937this parameter. @code{quit-restore-window} deletes the specified window 3941this parameter. This function may delete @var{window} if and only if
3938only if it still shows that buffer. 3942it still shows that buffer.
3939 3943
3940The window is deleted entirely if: 1) the first element of the 3944This 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 3945first element of its @code{quit-restore} parameter is either
3942window has no history of previously-displayed buffers, and 3) the 3946@code{window} or @code{frame}, (2) the window has no history of
3943displayed buffer matches the one in the fourth element of the 3947previously-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
3945only window on its frame and there are other frames on the frame's 3949in @var{window}. If @var{window} is part of an atomic window
3946terminal, the value of the optional argument @var{bury-or-kill} 3950(@pxref{Atomic Windows}), it will try to delete the root of that
3947determines how to proceed with the window. If @var{bury-or-kill} 3951atomic window instead. In either case, it tries to avoid signaling an
3948equals @code{kill}, the frame is deleted unconditionally. Otherwise, 3952error when @var{window} cannot be deleted.
3949the fate of the frame is determined by calling 3953
3950@code{frame-auto-hide-function} (see below) with that frame as sole 3954If @var{window} shall be deleted, is the only window on its frame and
3951argument. 3955there are other frames on that frame's terminal, the value of the
3956optional argument @var{bury-or-kill} determines how to proceed with
3957the window. If @var{bury-or-kill} equals @code{kill}, the frame is
3958deleted unconditionally. Otherwise, the fate of the frame is
3959determined by calling @code{frame-auto-hide-function} (see below) with
3960that frame as sole argument.
3952 3961
3953If the third element of the @code{quit-restore} parameter is a list of 3962If the third element of the @code{quit-restore} parameter is a list of
3954buffer, window start (@pxref{Window Start and End}), and point 3963buffer, window start (@pxref{Window Start and End}), and point
@@ -3959,7 +3968,8 @@ try to restore the original height of @var{window}.
3959 3968
3960Otherwise, if @var{window} was previously used for displaying other 3969Otherwise, if @var{window} was previously used for displaying other
3961buffers (@pxref{Window History}), the most recent buffer in that 3970buffers (@pxref{Window History}), the most recent buffer in that
3962history will be displayed. 3971history will be displayed. In either case, if @var{window} is not
3972deleted, its @code{quit-restore} parameter is reset to @code{nil}.
3963 3973
3964The optional argument @var{bury-or-kill} specifies how to deal with 3974The 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
4440parameters have to be set by the application explicitly via a 4450parameters 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
4454constituents gets deleted. To dissolve an atomic window manually,
4455reset the @code{window-atom} parameter of its constituents---the root
4456of 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,
4444first splits the selected window and makes the selected and the new 4459first splits the selected window and makes the selected and the new
4445window constituents of an atomic window with their parent as root. It 4460window constituents of an atomic window with their parent as root. It