branch: externals/eglot
commit efac602ac4cc8422c8c95f1e931c90bad3bee310
Author: João Távora <[email protected]>
Commit: João Távora <[email protected]>
Fix #673: declare eglot--cached-server before use
Per #670.
Otherwise the dynamic binding of it in in eglot--connect won't work.
* eglot.el (eglot--cached-server): Move up.
---
eglot.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/eglot.el b/eglot.el
index f926709..3373be2 100644
--- a/eglot.el
+++ b/eglot.el
@@ -907,6 +907,9 @@ Each function is passed the server as an argument")
" "))
contact))
+(defvar-local eglot--cached-server nil
+ "A cached reference to the current EGLOT server.")
+
(defun eglot--connect (managed-major-mode project class contact)
"Connect to MANAGED-MAJOR-MODE, PROJECT, CLASS and CONTACT.
This docstring appeases checkdoc, that's all."
@@ -1378,9 +1381,6 @@ For example, to keep your Company customization use
(push (cons ',symbol (symbol-value ',symbol)) eglot--saved-bindings)
(setq-local ,symbol ,binding)))
-(defvar-local eglot--cached-server nil
- "A cached reference to the current EGLOT server.")
-
(defun eglot-managed-p ()
"Tell if current buffer is managed by EGLOT."
eglot--managed-mode)