diff --git a/core/core-popups.el b/core/core-popups.el index afc75c85c..5ca2fd044 100644 --- a/core/core-popups.el +++ b/core/core-popups.el @@ -144,11 +144,6 @@ recognized by DOOM's popup system. They are: (defun doom-display-buffer-action (buffer alist) (shackle-display-buffer buffer alist (shackle-match buffer))) - (add-hook! doom-post-init - (setq display-buffer-alist - (cons '(doom-display-buffer-condition doom-display-buffer-action) - display-buffer-alist))) - (defun doom|autokill-popups () (or (not (doom-popup-p)) (prog1 (when (and (not doom-popup-inhibit-autokill) @@ -157,7 +152,12 @@ recognized by DOOM's popup system. They are: (when-let* ((process (get-buffer-process (current-buffer)))) (set-process-query-on-exit-flag process nil)) t)))) - (add-hook 'kill-buffer-query-functions #'doom|autokill-popups) + + (add-hook! doom-post-init + (setq display-buffer-alist + (cons '(doom-display-buffer-condition doom-display-buffer-action) + display-buffer-alist)) + (add-hook 'kill-buffer-query-functions #'doom|autokill-popups)) ;; no modeline in popups (add-hook 'doom-popup-mode-hook #'doom|hide-modeline-in-popup) diff --git a/core/core-ui.el b/core/core-ui.el index 708e71c4e..e4728f3c4 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -233,7 +233,8 @@ local value, whether or not it's permanent-local. Therefore, we cycle instead)." (not (delq (selected-window) (get-buffer-window-list nil nil t)))) -(add-hook 'kill-buffer-query-functions #'doom|protect-visible-buffers) +(add-hook! doom-post-init + (add-hook 'kill-buffer-query-functions #'doom|protect-visible-buffers)) ;; temporary windows often have q bound to `quit-window', which only buries the ;; contained buffer. I rarely don't want that buffer killed, so...