]> git.eshelyaron.com Git - emacs.git/commitdiff
Unbreak interactivee eglot--connect for complex contact specs
authorJoão Távora <joaotavora@gmail.com>
Wed, 13 Jan 2021 15:13:32 +0000 (15:13 +0000)
committerJoão Távora <joaotavora@gmail.com>
Wed, 13 Jan 2021 15:13:32 +0000 (15:13 +0000)
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

index 5bd087c4354b088335c0e5091050c8c308a57830..f843c2dba6536cb1642c14234ca2521d49e90618 100644 (file)
@@ -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))