From: Philip Kaludercic Date: Thu, 7 Mar 2024 09:21:45 +0000 (+0100) Subject: Query Eglot version via package.el X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3e5ba1429624d1dafdddec9be426c045d0e1043e;p=emacs.git Query Eglot version via package.el * lisp/progmodes/eglot.el (eglot--version): Remove constant. (eglot--connect): Use 'package-get-version'. (cherry picked from commit 3d4918c2f1d10df4051ca7dc1d17decf157adb3f) --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 406e7cf91a2..fefd4b87a17 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -565,13 +565,6 @@ This can be useful when using docker to run a language server.") ;;; Constants ;;; -(defconst eglot--version - (eval-when-compile - (when byte-compile-current-file - (require 'lisp-mnt) - (lm-version byte-compile-current-file))) - "The version as a string of this version of Eglot. -It is nil if Eglot is not byte-complied.") (defconst eglot--symbol-kind-names `((1 . "File") (2 . "Module") @@ -1606,8 +1599,10 @@ This docstring appeases checkdoc, that's all." 'network)) (emacs-pid)) :clientInfo - `(:name "Eglot" ,@(when eglot--version - `(:version ,eglot--version))) + (append + '(:name "Eglot") + (let ((v (package-get-version))) + (and v (list :version v)))) ;; Maybe turn trampy `/ssh:foo@bar:/path/to/baz.py' ;; into `/path/to/baz.py', so LSP groks it. :rootPath (file-local-name