[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 4c084ba: Run quit-window-hook from the correct buff
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master 4c084ba: Run quit-window-hook from the correct buffer |
Date: |
Thu, 22 Aug 2019 20:08:04 -0400 (EDT) |
branch: master
commit 4c084ba6b8953dac6f80148c0a20b92b6e7f6932
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Run quit-window-hook from the correct buffer
* lisp/window.el (quit-window): Run the hook from the buffer
specified by the WINDOW parameter.
---
lisp/window.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lisp/window.el b/lisp/window.el
index 334b56c..cf73315 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 4c084ba: Run quit-window-hook from the correct buffer,
Lars Ingebrigtsen <=