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:
parent
60f6418db2
commit
916210d5a8
1 changed files with 7 additions and 6 deletions
|
@ -164,12 +164,13 @@ evil-mode is active."
|
||||||
|
|
||||||
((and (featurep 'evil)
|
((and (featurep 'evil)
|
||||||
evil-mode
|
evil-mode
|
||||||
(cl-destructuring-bind (beg . end)
|
(ignore-errors
|
||||||
(bounds-of-thing-at-point 'symbol)
|
(cl-destructuring-bind (beg . end)
|
||||||
(evil-goto-definition)
|
(bounds-of-thing-at-point 'symbol)
|
||||||
(let ((pt (point)))
|
(evil-goto-definition)
|
||||||
(not (and (>= pt beg)
|
(let ((pt (point)))
|
||||||
(< pt end)))))))
|
(not (and (>= pt beg)
|
||||||
|
(< pt end))))))))
|
||||||
|
|
||||||
((error "Couldn't find '%s'" identifier))))
|
((error "Couldn't find '%s'" identifier))))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue