aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2017-11-04 11:56:26 +0200
committerEli Zaretskii2017-11-04 11:56:26 +0200
commit787b75ad71be76a6f4fac6e25577800112fe44b9 (patch)
tree7a899c235a021e88e9f3b135d605c14363abb4d2
parentd9be8704ae905e510cc4b657d267770deb816873 (diff)
downloademacs-787b75ad71be76a6f4fac6e25577800112fe44b9.tar.gz
emacs-787b75ad71be76a6f4fac6e25577800112fe44b9.zip
Improve documentation of window hooks
* doc/lispref/windows.texi (Window Hooks): Fix the description of window-configuration-change-hook. (Bug#29049) <run-window-scroll-functions, run-window-configuration-change-hook>: Document these functions.
-rw-r--r--doc/lispref/windows.texi18
1 files changed, 14 insertions, 4 deletions
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 5014cd3d82d..fc642fe9447 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -5138,6 +5138,11 @@ is scrolled. It's not designed for that, and such use probably won't
5138work. 5138work.
5139@end defvar 5139@end defvar
5140 5140
5141@defun run-window-scroll-functions &optional window
5142This function calls @code{window-scroll-functions} for the specified
5143@var{window}, which defaults to the selected window.
5144@end defun
5145
5141@defvar window-size-change-functions 5146@defvar window-size-change-functions
5142This variable holds a list of functions to be called if the size of any 5147This variable holds a list of functions to be called if the size of any
5143window changes for any reason. The functions are called once per 5148window changes for any reason. The functions are called once per
@@ -5167,17 +5172,22 @@ be called again.
5167@defvar window-configuration-change-hook 5172@defvar window-configuration-change-hook
5168A normal hook that is run every time the window configuration of a frame 5173A normal hook that is run every time the window configuration of a frame
5169changes. Window configuration changes include splitting and deleting 5174changes. Window configuration changes include splitting and deleting
5170windows and the display of a different buffer in a window. Resizing the 5175windows, and the display of a different buffer in a window. Resizing the
5171frame or individual windows do not count as configuration changes. Use 5176frame or individual windows do not count as configuration changes. Use
5172@code{window-size-change-functions}, see above, when you want to track 5177@code{window-size-change-functions}, see above, when you want to track
5173size changes that are not caused by the deletion or creation of windows. 5178size changes that are not caused by the deletion or creation of windows.
5174 5179
5175The buffer-local part of this hook is run once for each window on the 5180The buffer-local value of this hook is run once for each window on the
5176affected frame, with the relevant window selected and its buffer 5181affected frame, with the relevant window selected and its buffer
5177current. The global part is run once for the modified frame, with that 5182current. The global value of this hook is run once for the modified
5178frame selected. 5183frame, with that frame selected.
5179@end defvar 5184@end defvar
5180 5185
5186@defun run-window-configuration-change-hook &optional frame
5187This function runs @code{window-configuration-change-hook} for the
5188specified @var{frame}, which defaults to the selected frame.
5189@end defun
5190
5181 In addition, you can use @code{jit-lock-register} to register a Font 5191 In addition, you can use @code{jit-lock-register} to register a Font
5182Lock fontification function, which will be called whenever parts of a 5192Lock fontification function, which will be called whenever parts of a
5183buffer are (re)fontified because a window was scrolled or its size 5193buffer are (re)fontified because a window was scrolled or its size