From: João Távora Date: Fri, 23 Apr 2021 07:49:02 +0000 (+0100) Subject: Declare eglot--cached-server before use X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~143 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f634580f1bb8c2e329810adfef42f35503cb8848;p=emacs.git Declare eglot--cached-server before use 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 --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index f926709e8cf..3373be2256c 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/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)