Move doom*quit-window to core-editor

This commit is contained in:
Henrik Lissner 2018-01-01 16:30:22 -05:00
parent 3708d76f51
commit fd11f958f9
No known key found for this signature in database
GPG Key ID: 5F6C0EA160557395
2 changed files with 6 additions and 6 deletions

View File

@ -58,6 +58,12 @@ modes are active and the buffer is read-only.")
(ignore (bury-buffer))))
(add-hook 'kill-buffer-query-functions #'doom|dont-kill-scratch-buffer)
;; 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)
(defun doom|check-large-file ()
"Check if the buffer's file is large (see `doom-large-file-size'). If so, ask
for confirmation to open it literally (read-only, disabled undo and in

View File

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