Flip default kill flag in quit-window #309
This commit is contained in:
parent
b6eec664bb
commit
9632b8c09d
3 changed files with 8 additions and 2 deletions
|
@ -239,7 +239,7 @@ without leaving any trace behind (muahaha)."
|
|||
(if (featurep 'evil)
|
||||
#'evil-force-normal-state
|
||||
#'keyboard-quit))
|
||||
(delete-window)))
|
||||
(quit-restore-window nil 'kill)))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom/popup-this-buffer ()
|
||||
|
|
|
@ -180,7 +180,7 @@ recognized by DOOM's popup system. They are:
|
|||
(define-key map [escape] #'doom/popup-close-maybe)
|
||||
(define-key map (kbd "ESC") #'doom/popup-close-maybe)
|
||||
(define-key map [remap quit-window] #'doom/popup-close-maybe)
|
||||
(define-key map [remap doom/kill-this-buffer] #'delete-window)
|
||||
(define-key map [remap doom/kill-this-buffer] #'doom/popup-close-maybe)
|
||||
(define-key map [remap split-window-right] #'ignore)
|
||||
(define-key map [remap split-window-below] #'ignore)
|
||||
(define-key map [remap split-window-horizontally] #'ignore)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue