Flip default kill flag in quit-window #309

This commit is contained in:
Henrik Lissner 2017-12-30 01:19:56 -05:00
parent b6eec664bb
commit 9632b8c09d
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 8 additions and 2 deletions

View file

@ -235,6 +235,12 @@ instead)."
(get-buffer-window-list nil nil t))))
(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...
(defun doom*quit-window (orig-fn &optional kill window)
(funcall orig-fn (not kill) window))
(advice-add #'quit-window :around #'doom*quit-window)
;;
;; Plugins