* eglot.el (eglot--guess-contact): Interpret a list containing a
single string as an executable when forming the interactive prompt.
GitHub-reference: fix https://github.com/joaotavora/eglot/issues/474
GitHub-reference: fix https://github.com/joaotavora/eglot/issues/478
(prog1 (car guess) (setq guess (cdr guess))))
'eglot-lsp-server))
(program (and (listp guess)
- (stringp (car guess)) (stringp (cadr guess)) (car guess)))
+ (stringp (car guess))
+ ;; A second element might be the port of a (host, port)
+ ;; pair, but in that case it is not a string.
+ (or (null (cdr guess)) (stringp (cadr guess)))
+ (car guess)))
(base-prompt
(and interactive
"Enter program to execute (or <host>:<port>): "))