fix: prevent quit in the middle of doom/escape
This commit is contained in:
parent
7acb67285c
commit
f26b038ec3
1 changed files with 13 additions and 12 deletions
|
@ -93,6 +93,7 @@ all hooks after it are ignored.")
|
|||
(defun doom/escape (&optional interactive)
|
||||
"Run `doom-escape-hook'."
|
||||
(interactive (list 'interactive))
|
||||
(let ((inhibit-quit t))
|
||||
(cond ((minibuffer-window-active-p (minibuffer-window))
|
||||
;; quit the minibuffer if open.
|
||||
(when interactive
|
||||
|
@ -105,7 +106,7 @@ all hooks after it are ignored.")
|
|||
;; Back to the default
|
||||
((unwind-protect (keyboard-quit)
|
||||
(when interactive
|
||||
(setq this-command 'keyboard-quit))))))
|
||||
(setq this-command 'keyboard-quit)))))))
|
||||
|
||||
(global-set-key [remap keyboard-quit] #'doom/escape)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue