Add kill-buffer-query-fns at post-init (fix race condition)
This commit is contained in:
parent
ef9fc05839
commit
a370b5b125
2 changed files with 8 additions and 7 deletions
|
@ -144,11 +144,6 @@ recognized by DOOM's popup system. They are:
|
||||||
(defun doom-display-buffer-action (buffer alist)
|
(defun doom-display-buffer-action (buffer alist)
|
||||||
(shackle-display-buffer buffer alist (shackle-match buffer)))
|
(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 ()
|
(defun doom|autokill-popups ()
|
||||||
(or (not (doom-popup-p))
|
(or (not (doom-popup-p))
|
||||||
(prog1 (when (and (not doom-popup-inhibit-autokill)
|
(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))))
|
(when-let* ((process (get-buffer-process (current-buffer))))
|
||||||
(set-process-query-on-exit-flag process nil))
|
(set-process-query-on-exit-flag process nil))
|
||||||
t))))
|
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
|
;; no modeline in popups
|
||||||
(add-hook 'doom-popup-mode-hook #'doom|hide-modeline-in-popup)
|
(add-hook 'doom-popup-mode-hook #'doom|hide-modeline-in-popup)
|
||||||
|
|
|
@ -233,7 +233,8 @@ local value, whether or not it's permanent-local. Therefore, we cycle
|
||||||
instead)."
|
instead)."
|
||||||
(not (delq (selected-window)
|
(not (delq (selected-window)
|
||||||
(get-buffer-window-list nil nil t))))
|
(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
|
;; temporary windows often have q bound to `quit-window', which only buries the
|
||||||
;; contained buffer. I rarely don't want that buffer killed, so...
|
;; contained buffer. I rarely don't want that buffer killed, so...
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue