summaryrefslogtreecommitdiff
path: root/doc/lispref/windows.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/lispref/windows.texi')
-rw-r--r--doc/lispref/windows.texi23
1 files changed, 18 insertions, 5 deletions
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 5014cd3d82d..e1eac457179 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -5127,7 +5127,10 @@ redisplaying a window with scrolling. Displaying a different buffer in
the window also runs these functions.
This variable is not a normal hook, because each function is called with
-two arguments: the window, and its new display-start position.
+two arguments: the window, and its new display-start position. At the
+time of the call, the display-start position of the window argument is
+already set to its new value, and the buffer to be displayed in the
+window is already set as the current buffer.
These functions must take care when using @code{window-end}
(@pxref{Window Start and End}); if you need an up-to-date value, you
@@ -5138,6 +5141,11 @@ is scrolled. It's not designed for that, and such use probably won't
work.
@end defvar
+@defun run-window-scroll-functions &optional window
+This function calls @code{window-scroll-functions} for the specified
+@var{window}, which defaults to the selected window.
+@end defun
+
@defvar window-size-change-functions
This variable holds a list of functions to be called if the size of any
window changes for any reason. The functions are called once per
@@ -5167,17 +5175,22 @@ be called again.
@defvar window-configuration-change-hook
A normal hook that is run every time the window configuration of a frame
changes. Window configuration changes include splitting and deleting
-windows and the display of a different buffer in a window. Resizing the
+windows, and the display of a different buffer in a window. Resizing the
frame or individual windows do not count as configuration changes. Use
@code{window-size-change-functions}, see above, when you want to track
size changes that are not caused by the deletion or creation of windows.
-The buffer-local part of this hook is run once for each window on the
+The buffer-local value of this hook is run once for each window on the
affected frame, with the relevant window selected and its buffer
-current. The global part is run once for the modified frame, with that
-frame selected.
+current. The global value of this hook is run once for the modified
+frame, with that frame selected.
@end defvar
+@defun run-window-configuration-change-hook &optional frame
+This function runs @code{window-configuration-change-hook} for the
+specified @var{frame}, which defaults to the selected frame.
+@end defun
+
In addition, you can use @code{jit-lock-register} to register a Font
Lock fontification function, which will be called whenever parts of a
buffer are (re)fontified because a window was scrolled or its size