From 8bfa5a30fd9a862214a5fdc37e067402888b8098 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 7 Mar 2019 23:02:40 -0500 Subject: [PATCH] Fix lookup commands not aborting on C-g/ESC #1226 When aborting a lookup handler with C-g/ESC, Doom was convinced that it had failed legitimately, so tries the next. The expected behavior is that it abort the entire lookup operation. --- modules/feature/lookup/autoload/lookup.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/feature/lookup/autoload/lookup.el b/modules/feature/lookup/autoload/lookup.el index 038ff81b9..4a6c2c9b1 100644 --- a/modules/feature/lookup/autoload/lookup.el +++ b/modules/feature/lookup/autoload/lookup.el @@ -134,7 +134,9 @@ Otherwise, these properties are available to be set: nil))) (defun +lookup--jump-to (prop identifier &optional other-window) - (let ((ret (run-hook-wrapped + (let ((ret + (condition-case e + (run-hook-wrapped (plist-get (list :definition '+lookup-definition-functions :references '+lookup-references-functions :documentation '+lookup-documentation-functions @@ -143,7 +145,8 @@ Otherwise, these properties are available to be set: '+lookup--run-hooks identifier (point-marker) - other-window))) + other-window) + (quit (user-error "Aborted %s lookup" prop))))) (cond ((null ret) (message "Could not find '%s'" identifier) nil)