It's better if eglot--current-server is removed, since it was being
abused by other packages, and has side effects. The only place where
it was really needed was eglot--maybe-activate-editing-mode, so the
find-and-cache logic has been moved there. All other places that can
handle a nil server now use eglot-current-server, the external
version.
* eglot.el (eglot-shutdown, eglot, eglot--read-server)
(eglot--mode-line-format): Use eglot-current-server.
(eglot--connect): Update comment.
(eglot--current-server): Remove.
(eglot-current-server): New helper.
(eglot--maybe-activate-editing-mode): find and cache the server here.
* eglot-tests.el (auto-detect-running-server)
(auto-shutdown, auto-reconnect, eglot-ensure)
(slow-async-connection): Use eglot-current-server.