Skip to content

Commit

Permalink
Fix joaotavora#474, joaotavora#478: prompt for executable if supplied…
Browse files Browse the repository at this point in the history
… name does not exist

* eglot.el (eglot--guess-contact): Interpret a list containing a
  single string as an executable when forming the interactive prompt.
  • Loading branch information
dandavison authored and joaotavora committed May 14, 2020
1 parent e690e8c commit 91a7cba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion eglot.el
Original file line number Diff line number Diff line change
Expand Up @@ -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>): "))
Expand Down

0 comments on commit 91a7cba

Please sign in to comment.