diff options
| author | Martin Rudalics | 2019-03-09 11:13:18 +0100 |
|---|---|---|
| committer | Martin Rudalics | 2019-03-09 11:13:18 +0100 |
| commit | 4e082ce3941a9c1fcaae509897761d3e24e08625 (patch) | |
| tree | c50e17baec00f63098e74ae750db28d8ba45f32b /etc | |
| parent | d2270d8fc93b5fb0b82fec4d85d122ea4e38dff3 (diff) | |
| download | emacs-4e082ce3941a9c1fcaae509897761d3e24e08625.tar.gz emacs-4e082ce3941a9c1fcaae509897761d3e24e08625.zip | |
Further redesign of window change functions
* doc/lispref/windows.texi (Window Hooks): Revise description
of window change functions. Add documentation for
'window-state-change-hook' and window state change flag.
* etc/NEWS: Update entry for window change functions.
* src/frame.c (Fframe_window_state_change)
(Fset_frame_window_state_change): New functions.
* src/frame.h (struct frame): New boolean window_state_change.
(FRAME_WINDOW_STATE_CHANGE): New macro.
* src/window.c (window_change_record_frames): New static
boolean.
(window_change_record_frame): Remove function - code moved to
window_change_record.
(window_change_record): Record frame changes here taking
window_change_record_frames into account.
(run_window_change_functions_1): Set window_change_record_frames
whenever we run one of our hooks.
(run_window_change_functions): Run hooks also when
FRAME_WINDOW_STATE_CHANGE has been set. Run
Vwindow_state_change_hook. Leave decision whether to record
changes for all frames to window_change_record.
(Vwindow_state_change_functions): Update doc-string.
(Vwindow_state_change_hook): New normal hook.
Diffstat (limited to 'etc')
| -rw-r--r-- | etc/NEWS | 18 |
1 files changed, 9 insertions, 9 deletions
| @@ -1424,18 +1424,20 @@ displaying the same buffer. See the node "(elisp) Face Remapping" | |||
| 1424 | of the Emacs Lisp Reference manual for more detail. | 1424 | of the Emacs Lisp Reference manual for more detail. |
| 1425 | 1425 | ||
| 1426 | +++ | 1426 | +++ |
| 1427 | ** Window change functions have been redesigned completely. | 1427 | ** Window change functions have been redesigned. |
| 1428 | 1428 | ||
| 1429 | Hooks reacting to window changes run now only when redisplay detects | 1429 | Hooks reacting to window changes run now only when redisplay detects |
| 1430 | that a change has actually occurred. The five hooks provided are: | 1430 | that a change has actually occurred. Six hooks are now provided: |
| 1431 | 'window-buffer-change-functions' (run after window buffers have | 1431 | 'window-buffer-change-functions' (run after window buffers have |
| 1432 | changed), 'window-size-change-functions' (run after a window was | 1432 | changed), 'window-size-change-functions' (run after a window was |
| 1433 | assigned a new buffer or size), 'window-configuration-change-hook' | 1433 | assigned a new buffer or size), 'window-configuration-change-hook' |
| 1434 | (like the former but run also when a window was deleted), | 1434 | (like the former but run also when a window was deleted), |
| 1435 | 'window-selection-change-functions' (run when the selected window | 1435 | 'window-selection-change-functions' (run when the selected window |
| 1436 | changed) and 'window-state-change-functions' (run when any of the | 1436 | changed) and 'window-state-change-functions' and |
| 1437 | preceding ones is run). 'window-scroll-functions' are unaffected by | 1437 | 'window-state-change-hook' (run when any of the preceding ones is |
| 1438 | these changes. | 1438 | run). Applications can enforce running the latter two using the new |
| 1439 | function 'set-frame-window-state-change'. 'window-scroll-functions' | ||
| 1440 | are unaffected by these changes. | ||
| 1439 | 1441 | ||
| 1440 | In addition, a number of functions now allow the caller to detect what | 1442 | In addition, a number of functions now allow the caller to detect what |
| 1441 | has changed since last redisplay: 'window-old-buffer' returns for any | 1443 | has changed since last redisplay: 'window-old-buffer' returns for any |
| @@ -1447,10 +1449,8 @@ during last redisplay. 'window-old-pixel-width' (renamed from | |||
| 1447 | 'window-old-body-pixel-width' and 'window-old-body-pixel-height' | 1449 | 'window-old-body-pixel-width' and 'window-old-body-pixel-height' |
| 1448 | return the total and body sizes of any window during last redisplay. | 1450 | return the total and body sizes of any window during last redisplay. |
| 1449 | 1451 | ||
| 1450 | One consequence of these changes is that all window change functions | 1452 | See the section "(elisp) Window Hooks" in the Elisp manual for a |
| 1451 | run now after functions run by 'post-command-hook'. See the section | 1453 | detailed explanation of the new behavior. |
| 1452 | "(elisp) Window Hooks" in the Elisp manual for a detailed explanation | ||
| 1453 | of the new behavior. | ||
| 1454 | 1454 | ||
| 1455 | +++ | 1455 | +++ |
| 1456 | ** New buffer display action alist entry 'dedicated'. | 1456 | ** New buffer display action alist entry 'dedicated'. |