popups: handle :autokill in a kill-buffer-query-fn

This commit is contained in:
Henrik Lissner 2017-12-29 22:30:34 -05:00
parent 0c06514c6f
commit 37a07c79b7
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 11 additions and 9 deletions

View file

@ -413,12 +413,4 @@ properties."
(when (doom-popup-p window)
(setq doom-popup-windows (delq window doom-popup-windows))
(when doom-popup-remember-history
(setq doom-popup-history (list (doom--popup-data window))))
(let ((autokill-p (and (not doom-popup-inhibit-autokill)
(doom-popup-property :autokill window))))
(with-selected-window window
(doom-popup-mode -1)
(when autokill-p
(when-let* ((process (get-buffer-process (current-buffer))))
(set-process-query-on-exit-flag process nil))
(kill-buffer (current-buffer)))))))
(setq doom-popup-history (list (doom--popup-data window))))))