From efac602ac4cc8422c8c95f1e931c90bad3bee310 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Fri, 23 Apr 2021 08:49:02 +0100 Subject: [PATCH] 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 f926709e..3373be22 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)