From: João Távora Date: Sun, 10 Jan 2021 16:42:59 +0000 (+0000) Subject: C-u m-x eglot discards class guessed by eglot--guess-contact X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~188 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=30139cc1f482c925861c54e9a6ea06effab02ff1;p=emacs.git 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. --- 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)