From: Philip Kaludercic Date: Thu, 7 Mar 2024 09:21:45 +0000 (+0100) Subject: Query Eglot version via package.el X-Git-Tag: archive/raspbian/1%30.1+1-3+rpi1^2~2^2~20^2~1668 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3d4918c2f1d10df4051ca7dc1d17decf157adb3f;p=emacs.git Query Eglot version via package.el * lisp/progmodes/eglot.el (eglot--version): Remove constant. (eglot--connect): Use 'package-get-version'. --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index c210de39c65..adbcac3c9af 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