aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMartin Rudalics2018-11-18 09:24:10 +0100
committerMartin Rudalics2018-11-18 09:24:10 +0100
commit72525076996cd709086b1afb47ab0d095322e9b7 (patch)
treed86cd2fcd2bf2255d6f246c85552a847b64ef92d /doc
parent88762b4063a42a69234bda74b1626b646734715a (diff)
downloademacs-72525076996cd709086b1afb47ab0d095322e9b7.tar.gz
emacs-72525076996cd709086b1afb47ab0d095322e9b7.zip
Fix description of some window hooks
* doc/lispref/windows.texi (Window Hooks): Remove text that warns against using 'save-window-excursion' while running 'window-size-change-functions', it's no more relevant. Clarify description of 'window-configuration-change-hook'.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/windows.texi32
1 files changed, 15 insertions, 17 deletions
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index e9bd0c7d83e..46f106838a5 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -6016,26 +6016,24 @@ whether a specific window has changed size, compare the return values of
6016@code{window-pixel-height} for that window (@pxref{Window Sizes}). 6016@code{window-pixel-height} for that window (@pxref{Window Sizes}).
6017 6017
6018These function are usually only called when at least one window was 6018These function are usually only called when at least one window was
6019added or has changed size since the last time this hook was run for the 6019added or has changed size since the last time this hook was run for
6020associated frame. In some rare cases this hook also runs when a window 6020the associated frame. In some rare cases this hook also runs when a
6021that was added intermittently has been deleted afterwards. In these 6021window that was added intermittently has been deleted afterwards. In
6022cases none of the windows on the frame will appear to have changed its 6022these cases none of the windows on the frame will appear to have
6023size. 6023changed its size.
6024
6025You may use @code{save-selected-window} in these functions
6026(@pxref{Selecting Windows}). However, do not use
6027@code{save-window-excursion} (@pxref{Window Configurations}); exiting
6028that macro counts as a size change, which would cause these functions to
6029be called again.
6030@end defvar 6024@end defvar
6031 6025
6032@defvar window-configuration-change-hook 6026@defvar window-configuration-change-hook
6033A normal hook that is run every time the window configuration of a frame 6027A normal hook that is run every time the window configuration of a
6034changes. Window configuration changes include splitting and deleting 6028frame changes. Window configuration changes include splitting and
6035windows, and the display of a different buffer in a window. Resizing the 6029deleting windows, and the display of a different buffer in a window.
6036frame or individual windows do not count as configuration changes. Use 6030
6037@code{window-size-change-functions}, see above, when you want to track 6031The hook can be also used for tracking changes of window sizes. It
6038size changes that are not caused by the deletion or creation of windows. 6032is, however, not run when the size of a frame changes or automatic
6033resizing of a minibuffer window (@pxref{Minibuffer Windows}) changes
6034the size of another window. As a rule, adding a function to
6035@code{window-size-change-functions}, see above, is the recommended way
6036for reliably tracking size changes of any window.
6039 6037
6040The buffer-local value of this hook is run once for each window on the 6038The buffer-local value of this hook is run once for each window on the
6041affected frame, with the relevant window selected and its buffer 6039affected frame, with the relevant window selected and its buffer