mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-30 17:01:02 -05:00
Ensure switch hooks don't reference dead buffers
This commit is contained in:
@@ -315,8 +315,9 @@ from the default."
|
|||||||
(let ((doom-inhibit-switch-buffer-hooks t))
|
(let ((doom-inhibit-switch-buffer-hooks t))
|
||||||
(run-hooks 'doom-exit-buffer-hook)
|
(run-hooks 'doom-exit-buffer-hook)
|
||||||
(prog1 (apply orig-fn buffer-or-name args)
|
(prog1 (apply orig-fn buffer-or-name args)
|
||||||
(with-current-buffer buffer-or-name
|
(when (buffer-live-p (get-buffer buffer-or-name))
|
||||||
(run-hooks 'doom-enter-buffer-hook))))))
|
(with-current-buffer buffer-or-name
|
||||||
|
(run-hooks 'doom-enter-buffer-hook)))))))
|
||||||
|
|
||||||
(defun doom|init-custom-hooks (&optional disable)
|
(defun doom|init-custom-hooks (&optional disable)
|
||||||
(dolist (spec '((select-window . doom*switch-window-hooks)
|
(dolist (spec '((select-window . doom*switch-window-hooks)
|
||||||
|
Reference in New Issue
Block a user