mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
fix: prevent quit in the middle of doom/escape
This commit is contained in:
@ -93,6 +93,7 @@ all hooks after it are ignored.")
|
|||||||
(defun doom/escape (&optional interactive)
|
(defun doom/escape (&optional interactive)
|
||||||
"Run `doom-escape-hook'."
|
"Run `doom-escape-hook'."
|
||||||
(interactive (list 'interactive))
|
(interactive (list 'interactive))
|
||||||
|
(let ((inhibit-quit t))
|
||||||
(cond ((minibuffer-window-active-p (minibuffer-window))
|
(cond ((minibuffer-window-active-p (minibuffer-window))
|
||||||
;; quit the minibuffer if open.
|
;; quit the minibuffer if open.
|
||||||
(when interactive
|
(when interactive
|
||||||
@ -105,7 +106,7 @@ all hooks after it are ignored.")
|
|||||||
;; Back to the default
|
;; Back to the default
|
||||||
((unwind-protect (keyboard-quit)
|
((unwind-protect (keyboard-quit)
|
||||||
(when interactive
|
(when interactive
|
||||||
(setq this-command 'keyboard-quit))))))
|
(setq this-command 'keyboard-quit)))))))
|
||||||
|
|
||||||
(global-set-key [remap keyboard-quit] #'doom/escape)
|
(global-set-key [remap keyboard-quit] #'doom/escape)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user