]> git.eshelyaron.com Git - emacs.git/commit
Eglot: better fix for bug#70724
authorJoão Távora <joaotavora@gmail.com>
Thu, 6 Jun 2024 22:08:28 +0000 (17:08 -0500)
committerEshel Yaron <me@eshelyaron.com>
Fri, 7 Jun 2024 10:44:30 +0000 (12:44 +0200)
commitcac0a688b68eff950570f5a28fffb6be77aff6e4
tree11fa0d83f3af7bf1ee244d0d7e194e578921b8ca
parentcc93a6a0ab29ec58414e8a4089a9fe332c011c09
Eglot: better fix for bug#70724

If the project's root is or destroyed , this may happen for a
variety of reasons, including reasons affecting non-reconnection
scenarios, so better to check in eglot--connect.

An Eglot "reconnection" has always created as accurate a copy of
the previous server object as possible, down to the 'eq'ness or
the saved initargs, language ids, etc.  So re-querying for
projects is not the thing to do here.

A new different server can be created with `M-x eglot` which will
ask about shutting down the existing one.

* lisp/progmodes/eglot.el (eglot-reconnect):  Revert previous change.
(eglot--connect):  Do sanity check here

(cherry picked from commit 6906ed28f1b4ac0cf0a2a725e7402290f33c26e2)
lisp/progmodes/eglot.el