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)
evil-mode
(cl-destructuring-bind (beg . end)
(bounds-of-thing-at-point 'symbol)
(evil-goto-definition)
(let ((pt (point)))
(not (and (>= pt beg)
(< pt end)))))))
(ignore-errors
(cl-destructuring-bind (beg . end)
(bounds-of-thing-at-point 'symbol)
(evil-goto-definition)
(let ((pt (point)))
(not (and (>= pt beg)
(< pt end))))))))
((error "Couldn't find '%s'" identifier))))