feature/lookup: silence cl-destructuring-bind errors

In likely case where (bounds-of-thing-at-point 'symbol) returns nil,
cl-destructuring-bind would throw a wrong-number-of-args error we don't
care about.
This commit is contained in:
Henrik Lissner 2018-08-08 21:41:11 +02:00
parent 60f6418db2
commit 916210d5a8
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -164,12 +164,13 @@ evil-mode is active."
((and (featurep 'evil) ((and (featurep 'evil)
evil-mode evil-mode
(ignore-errors
(cl-destructuring-bind (beg . end) (cl-destructuring-bind (beg . end)
(bounds-of-thing-at-point 'symbol) (bounds-of-thing-at-point 'symbol)
(evil-goto-definition) (evil-goto-definition)
(let ((pt (point))) (let ((pt (point)))
(not (and (>= pt beg) (not (and (>= pt beg)
(< pt end))))))) (< pt end))))))))
((error "Couldn't find '%s'" identifier)))) ((error "Couldn't find '%s'" identifier))))