From b2dd04ddbe94b5a10884fd01a8309a0ea8f6b887 Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Mon, 25 May 2020 11:30:32 +0200 Subject: [PATCH] Fix type error in eglot--xref-make-match MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Its first argument is passed to xref-make-match, which expects a string as its SUMMARY argument, but symbol-at-point returns a symbol. Co-authored-by: João Távora * eglot.el (eglot--lsp-xrefs-for-method): use symbol-name. GitHub-reference: fix https://github.com/joaotavora/eglot/issues/488 --- lisp/progmodes/eglot.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index c38620edf96..15fa2a189fe 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1954,7 +1954,8 @@ Try to visit the target file for a richer summary line." (eglot--collecting-xrefs (collect) (mapc (eglot--lambda ((Location) uri range) - (collect (eglot--xref-make-match (symbol-at-point) uri range))) + (collect (eglot--xref-make-match (symbol-name (symbol-at-point)) + uri range))) (if (vectorp response) response (list response)))))) (cl-defun eglot--lsp-xref-helper (method &key extra-params capability ) -- 2.39.2