From 9622f03b5c679e1d69337c0758507ff3a3928207 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Wed, 13 Jan 2021 15:13:32 +0000 Subject: [PATCH] Unbreak interactivee eglot--connect for complex contact specs The previous commit for https://github.com/joaotavora/eglot/issues/526 was completely botched. One has to check current-prefix-arg for the presence of C-u, not eglot--guess-contact INTERACTIVE arg. * eglot.el (eglot--guess-contact): Be more careful when processing guess. GitHub-reference: fix https://github.com/joaotavora/eglot/issues/593 --- lisp/progmodes/eglot.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 5bd087c4354..f843c2dba65 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -725,9 +725,9 @@ be guessed." (guess (if (functionp guess) (funcall guess interactive) guess)) - (class (or (and (not interactive) - (consp guess) (symbolp (car guess)) - (prog1 (car guess) (setq guess (cdr guess)))) + (class (or (and (consp guess) (symbolp (car guess)) + (prog1 (unless current-prefix-arg (car guess)) + (setq guess (cdr guess)))) 'eglot-lsp-server)) (program (and (listp guess) (stringp (car guess)) -- 2.39.2