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.
This commit is contained in:
Henrik Lissner 2019-03-07 23:02:40 -05:00
parent 4055f667fb
commit 8bfa5a30fd
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -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)