From b2030c6ed3bbe74bc895839035889fe0731d2aa2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 4 Jun 2018 00:07:03 +0200 Subject: [PATCH] Refactor doom/escape Now returns first hook that returns non-nil; this makes it a little easier to debug doom-escape-hook. --- core/core-keybinds.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/core-keybinds.el b/core/core-keybinds.el index 6c02ab1f6..82b4fe966 100644 --- a/core/core-keybinds.el +++ b/core/core-keybinds.el @@ -35,11 +35,11 @@ If any hook returns non-nil, all hooks after it are ignored.") ;; quit the minibuffer if open. (abort-recursive-edit)) ;; 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 ((or defining-kbd-macro executing-kbd-macro) nil) ;; Back to the default - (t (keyboard-quit)))) + ((keyboard-quit)))) (global-set-key [remap keyboard-quit] #'doom/escape)