From: Felicián Németh Date: Mon, 18 Nov 2019 11:23:37 +0000 (+0100) Subject: Fail when eglot-find-* finds no references X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~270 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0453a2186634b5e9eca8e86748cdfe4002c3b855;p=emacs.git Fail when eglot-find-* finds no references * eglot.el (eglot--lsp-xref-helper): Display message when no references have been found instead of calling xref-find-references. GitHub-reference: fix https://github.com/joaotavora/eglot/issues/339 --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 7171911b0e3..c25b7b7f082 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1872,7 +1872,9 @@ Try to visit the target file for a richer summary line." method :extra-params extra-params :capability capability))) - (xref-find-references "LSP identifier at point."))) + (if eglot--lsp-xref-refs + (xref-find-references "LSP identifier at point.") + (eglot--message "%s returned no references" method)))) (defun eglot-find-declaration () "Find declaration for SYM, the identifier at point."