branch: externals/elpa commit 91a7cba0a3d10d2dd1da89df3581d67486dfaf88 Author: Dan Davison <dandavis...@gmail.com> Commit: João Távora <joaotav...@gmail.com>
Fix #474, #478: prompt for executable if supplied name does not exist * eglot.el (eglot--guess-contact): Interpret a list containing a single string as an executable when forming the interactive prompt. --- eglot.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/eglot.el b/eglot.el index 112959b..8a1d162 100644 --- a/eglot.el +++ b/eglot.el @@ -704,7 +704,11 @@ be guessed." (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>): "))