From: Dan Davison Date: Thu, 14 May 2020 00:06:35 +0000 (-0400) Subject: Prompt for executable if supplied name does not exist X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~221 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cc8bbf69ffbafc99296e5ccce17d39ea945cde63;p=emacs.git 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. GitHub-reference: fix https://github.com/joaotavora/eglot/issues/474 GitHub-reference: fix https://github.com/joaotavora/eglot/issues/478 --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 112959b3564..8a1d162c6d9 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/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 :): "))