From 30139cc1f482c925861c54e9a6ea06effab02ff1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Sun, 10 Jan 2021 16:42:59 +0000 Subject: [PATCH] C-u m-x eglot discards class guessed by eglot--guess-contact This will prevent C-u M-x eglot RET rust-analyzer from bringing into play the eglot-rls server class, which is only valid for the default RLS server. Found when testing for https://github.com/joaotavora/eglot/issues/526, though this bug might not necessarily be the problem being reported there. * eglot.el (eglot--guess-contact): Don't assume guessed class if INTERACTIVE. --- 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 9267a138bd3..5bd087c4354 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -725,7 +725,8 @@ be guessed." (guess (if (functionp guess) (funcall guess interactive) guess)) - (class (or (and (consp guess) (symbolp (car guess)) + (class (or (and (not interactive) + (consp guess) (symbolp (car guess)) (prog1 (car guess) (setq guess (cdr guess)))) 'eglot-lsp-server)) (program (and (listp guess) -- 2.39.2