]> git.eshelyaron.com Git - emacs.git/commitdiff
Declare eglot--cached-server before use
authorJoão Távora <joaotavora@gmail.com>
Fri, 23 Apr 2021 07:49:02 +0000 (08:49 +0100)
committerJoão Távora <joaotavora@gmail.com>
Fri, 23 Apr 2021 07:49:14 +0000 (08:49 +0100)
Per https://github.com/joaotavora/eglot/issues/670.

Otherwise the dynamic binding of it in in eglot--connect won't work.

* eglot.el (eglot--cached-server): Move up.

GitHub-reference: fix https://github.com/joaotavora/eglot/issues/673

lisp/progmodes/eglot.el

index f926709e8cffca728e0474b5c2c4ac117702a8d9..3373be2256c782fe75e71f8e54184b0e1204eaf4 100644 (file)
@@ -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)