diff options
| author | Eli Zaretskii | 2017-11-04 11:56:26 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2017-11-04 11:56:26 +0200 |
| commit | 787b75ad71be76a6f4fac6e25577800112fe44b9 (patch) | |
| tree | 7a899c235a021e88e9f3b135d605c14363abb4d2 | |
| parent | d9be8704ae905e510cc4b657d267770deb816873 (diff) | |
| download | emacs-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.texi | 18 |
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 | |||
| 5138 | work. | 5138 | work. |
| 5139 | @end defvar | 5139 | @end defvar |
| 5140 | 5140 | ||
| 5141 | @defun run-window-scroll-functions &optional window | ||
| 5142 | This 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 |
| 5142 | This variable holds a list of functions to be called if the size of any | 5147 | This variable holds a list of functions to be called if the size of any |
| 5143 | window changes for any reason. The functions are called once per | 5148 | window 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 |
| 5168 | A normal hook that is run every time the window configuration of a frame | 5173 | A normal hook that is run every time the window configuration of a frame |
| 5169 | changes. Window configuration changes include splitting and deleting | 5174 | changes. Window configuration changes include splitting and deleting |
| 5170 | windows and the display of a different buffer in a window. Resizing the | 5175 | windows, and the display of a different buffer in a window. Resizing the |
| 5171 | frame or individual windows do not count as configuration changes. Use | 5176 | frame 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 |
| 5173 | size changes that are not caused by the deletion or creation of windows. | 5178 | size changes that are not caused by the deletion or creation of windows. |
| 5174 | 5179 | ||
| 5175 | The buffer-local part of this hook is run once for each window on the | 5180 | The buffer-local value of this hook is run once for each window on the |
| 5176 | affected frame, with the relevant window selected and its buffer | 5181 | affected frame, with the relevant window selected and its buffer |
| 5177 | current. The global part is run once for the modified frame, with that | 5182 | current. The global value of this hook is run once for the modified |
| 5178 | frame selected. | 5183 | frame, with that frame selected. |
| 5179 | @end defvar | 5184 | @end defvar |
| 5180 | 5185 | ||
| 5186 | @defun run-window-configuration-change-hook &optional frame | ||
| 5187 | This function runs @code{window-configuration-change-hook} for the | ||
| 5188 | specified @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 |
| 5182 | Lock fontification function, which will be called whenever parts of a | 5192 | Lock fontification function, which will be called whenever parts of a |
| 5183 | buffer are (re)fontified because a window was scrolled or its size | 5193 | buffer are (re)fontified because a window was scrolled or its size |