aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/window.el9
1 files changed, 3 insertions, 6 deletions
diff --git a/lisp/window.el b/lisp/window.el
index 80dbd64f18a..334b56c8e60 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -4849,7 +4849,7 @@ all window-local buffer lists."
4849 (unrecord-window-buffer window buffer))))) 4849 (unrecord-window-buffer window buffer)))))
4850 4850
4851(defcustom quit-window-hook nil 4851(defcustom quit-window-hook nil
4852 "Hook run before performing any other actions in the `quit-buffer' command." 4852 "Hook run before performing any other actions in the `quit-window' command."
4853 :type 'hook 4853 :type 'hook
4854 :version "27.1" 4854 :version "27.1"
4855 :group 'windows) 4855 :group 'windows)
@@ -4882,11 +4882,7 @@ nil means to not handle the buffer in a particular way. This
4882 most reliable remedy to not have `switch-to-prev-buffer' switch 4882 most reliable remedy to not have `switch-to-prev-buffer' switch
4883 to this buffer again without killing the buffer. 4883 to this buffer again without killing the buffer.
4884 4884
4885`kill' means to kill WINDOW's buffer. 4885`kill' means to kill WINDOW's buffer."
4886
4887The functions in `quit-window-hook' will be run before doing
4888anything else."
4889 (run-hooks 'quit-window-hook)
4890 (setq window (window-normalize-window window t)) 4886 (setq window (window-normalize-window window t))
4891 (let* ((buffer (window-buffer window)) 4887 (let* ((buffer (window-buffer window))
4892 (quit-restore (window-parameter window 'quit-restore)) 4888 (quit-restore (window-parameter window 'quit-restore))
@@ -4986,6 +4982,7 @@ one. If non-nil, reset `quit-restore' parameter to nil.
4986The functions in `quit-window-hook' will be run before doing 4982The functions in `quit-window-hook' will be run before doing
4987anything else." 4983anything else."
4988 (interactive "P") 4984 (interactive "P")
4985 (run-hooks 'quit-window-hook)
4989 (quit-restore-window window (if kill 'kill 'bury))) 4986 (quit-restore-window window (if kill 'kill 'bury)))
4990 4987
4991(defun quit-windows-on (&optional buffer-or-name kill frame) 4988(defun quit-windows-on (&optional buffer-or-name kill frame)