aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorMartin Rudalics2024-03-04 10:33:49 +0100
committerMartin Rudalics2024-03-04 10:33:49 +0100
commit912e37b811107768e0cb3bc95184177f817dbdb2 (patch)
treeb620a3ad4619759971df4c4c449fb443a85d8f75 /src/buffer.c
parent6dacb60bb135dbb002c2ce1c70f70430c5d1bbff (diff)
downloademacs-912e37b811107768e0cb3bc95184177f817dbdb2.tar.gz
emacs-912e37b811107768e0cb3bc95184177f817dbdb2.zip
Fix 'set-window-configuration' and 'window-state-put'
Fix some bugs with 'window-state-put' (Bug#69093). Add new hook 'window-kept-windows-functions' (Bug#68235). * doc/lispref/windows.texi (Window Configurations): Mention 'window-kept-windows-functions'. (Window Hooks): Describe new abnormal hook 'window-kept-windows-functions'. * src/marker.c (Fmarker_last_position): New function to return the last position of a marker even if its buffer is now dead. * src/window.c (Fset_window_configuration): If 'window-kept-windows-functions' is non-nil, do not delete any window whose buffer is now dead but remember all such windows in a list to pass to 'window-kept-windows-functions'. Run 'window-kept-windows-functions' if it is non-nil. (Vwindow_kept_windows_functions): New abnormal hook run by Fset_window_configuration and 'window-state-put' with two arguments - the frame whose configuration is restored and a list of entries for each window whose buffer was found dead during restoration. Each entry is a list of four elements, the window, the dead buffer, and the last know positions of the start and point of that window. * lisp/window.el (window-state-put-kept-windows) (window-state-put-selected-window): New variables. (window--state-put-2): Make sure buffer is live before restoring its state. Set 'window-state-put-selected-window' to state's selected window. If 'window-kept-windows-functions' is non-nil, do not delete any windows whose buffer is found dead but remember all such windows in a list to pass to 'window-kept-windows-functions'. (window-state-put): Run 'window-kept-windows-functions' if it is non-nil. Select window recorded in 'window-state-put-selected-window'.
Diffstat (limited to 'src/buffer.c')
0 files changed, 0 insertions, 0 deletions