aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorMartin Rudalics2019-03-09 11:13:18 +0100
committerMartin Rudalics2019-03-09 11:13:18 +0100
commit4e082ce3941a9c1fcaae509897761d3e24e08625 (patch)
treec50e17baec00f63098e74ae750db28d8ba45f32b /etc
parentd2270d8fc93b5fb0b82fec4d85d122ea4e38dff3 (diff)
downloademacs-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/NEWS18
1 files changed, 9 insertions, 9 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 3e347b5318a..1095ecc7e5e 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1424,18 +1424,20 @@ displaying the same buffer. See the node "(elisp) Face Remapping"
1424of the Emacs Lisp Reference manual for more detail. 1424of 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
1429Hooks reacting to window changes run now only when redisplay detects 1429Hooks reacting to window changes run now only when redisplay detects
1430that a change has actually occurred. The five hooks provided are: 1430that 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
1432changed), 'window-size-change-functions' (run after a window was 1432changed), 'window-size-change-functions' (run after a window was
1433assigned a new buffer or size), 'window-configuration-change-hook' 1433assigned 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
1436changed) and 'window-state-change-functions' (run when any of the 1436changed) and 'window-state-change-functions' and
1437preceding ones is run). 'window-scroll-functions' are unaffected by 1437'window-state-change-hook' (run when any of the preceding ones is
1438these changes. 1438run). Applications can enforce running the latter two using the new
1439function 'set-frame-window-state-change'. 'window-scroll-functions'
1440are unaffected by these changes.
1439 1441
1440In addition, a number of functions now allow the caller to detect what 1442In addition, a number of functions now allow the caller to detect what
1441has changed since last redisplay: 'window-old-buffer' returns for any 1443has 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'
1448return the total and body sizes of any window during last redisplay. 1450return the total and body sizes of any window during last redisplay.
1449 1451
1450One consequence of these changes is that all window change functions 1452See the section "(elisp) Window Hooks" in the Elisp manual for a
1451run now after functions run by 'post-command-hook'. See the section 1453detailed explanation of the new behavior.
1452"(elisp) Window Hooks" in the Elisp manual for a detailed explanation
1453of the new behavior.
1454 1454
1455+++ 1455+++
1456** New buffer display action alist entry 'dedicated'. 1456** New buffer display action alist entry 'dedicated'.