]> git.eshelyaron.com Git - emacs.git/commitdiff
Unbreak eglot--guess-contact for host-and-port case
authorDan Davison <dandavison7@gmail.com>
Fri, 1 May 2020 00:04:24 +0000 (20:04 -0400)
committerJoão Távora <joaotavora@gmail.com>
Sat, 2 May 2020 22:43:54 +0000 (23:43 +0100)
* eglot.el (eglot--guess-contact): Fix bug in (host port) connection
case.

GitHub-reference: fix https://github.com/joaotavora/eglot/issues/446

lisp/progmodes/eglot.el

index 6db0a09f8f80aa4eecdef008c9871214c427edb3..adfd4e29f8ca69fa5a76044d6ed6903c1a8a790f 100644 (file)
@@ -698,7 +698,8 @@ be guessed."
          (class (or (and (consp guess) (symbolp (car guess))
                          (prog1 (car guess) (setq guess (cdr guess))))
                     'eglot-lsp-server))
-         (program (and (listp guess) (stringp (car guess)) (car guess)))
+         (program (and (listp guess)
+                       (stringp (car guess)) (stringp (cadr guess)) (car guess)))
          (base-prompt
           (and interactive
                "Enter program to execute (or <host>:<port>): "))