Commit 4c084ba6 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen

Run quit-window-hook from the correct buffer

* lisp/window.el (quit-window): Run the hook from the buffer
specified by the WINDOW parameter.
parent bb5cd7c4
Pipeline #2932 failed with stage
in 90 minutes and 1 second
......@@ -4982,7 +4982,10 @@ one. If non-nil, reset `quit-restore' parameter to nil.
The functions in `quit-window-hook' will be run before doing
anything else."
(interactive "P")
(run-hooks 'quit-window-hook)
;; Run the hook from the buffer implied to get any buffer-local
;; values.
(with-current-buffer (window-buffer (window-normalize-window window))
(run-hooks 'quit-window-hook))
(quit-restore-window window (if kill 'kill 'bury)))
(defun quit-windows-on (&optional buffer-or-name kill frame)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment