Refactor doom/escape
Now returns first hook that returns non-nil; this makes it a little easier to debug doom-escape-hook.
This commit is contained in:
parent
9ba76b60dc
commit
b2030c6ed3
1 changed files with 2 additions and 2 deletions
|
@ -35,11 +35,11 @@ If any hook returns non-nil, all hooks after it are ignored.")
|
||||||
;; quit the minibuffer if open.
|
;; quit the minibuffer if open.
|
||||||
(abort-recursive-edit))
|
(abort-recursive-edit))
|
||||||
;; Run all escape hooks. If any returns non-nil, then stop there.
|
;; Run all escape hooks. If any returns non-nil, then stop there.
|
||||||
((run-hook-with-args-until-success 'doom-escape-hook))
|
((cl-find-if #'funcall doom-escape-hook))
|
||||||
;; don't abort macros
|
;; don't abort macros
|
||||||
((or defining-kbd-macro executing-kbd-macro) nil)
|
((or defining-kbd-macro executing-kbd-macro) nil)
|
||||||
;; Back to the default
|
;; Back to the default
|
||||||
(t (keyboard-quit))))
|
((keyboard-quit))))
|
||||||
|
|
||||||
(global-set-key [remap keyboard-quit] #'doom/escape)
|
(global-set-key [remap keyboard-quit] #'doom/escape)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue