Move doom*quit-window to core-editor
This commit is contained in:
parent
3708d76f51
commit
fd11f958f9
|
@ -58,6 +58,12 @@ modes are active and the buffer is read-only.")
|
||||||
(ignore (bury-buffer))))
|
(ignore (bury-buffer))))
|
||||||
(add-hook 'kill-buffer-query-functions #'doom|dont-kill-scratch-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 ()
|
(defun doom|check-large-file ()
|
||||||
"Check if the buffer's file is large (see `doom-large-file-size'). If so, ask
|
"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
|
for confirmation to open it literally (read-only, disabled undo and in
|
||||||
|
|
|
@ -236,12 +236,6 @@ instead)."
|
||||||
(add-hook! doom-post-init
|
(add-hook! doom-post-init
|
||||||
(add-hook 'kill-buffer-query-functions #'doom|protect-visible-buffers))
|
(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
|
;; Plugins
|
||||||
|
|
Loading…
Reference in New Issue
Block a user