From c0ab4e9ca9326c472ff1d9d01a0e3966f20fda27 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Fri, 5 May 2023 14:51:09 +0100 Subject: [PATCH] Eglot: re-rename eglot-upgrade to eglot-upgrade-eglot * doc/misc/eglot.texi (Getting the latest version): Mention eglot-upgrade-eglot. * etc/EGLOT-NEWS: Mention eglot-upgrade-eglot. * lisp/progmodes/eglot.el (eglot-upgrade-eglot): Rename from eglot-update. (eglot-update): New compatibility alias. --- doc/misc/eglot.texi | 4 ++-- etc/EGLOT-NEWS | 9 ++++++++- lisp/progmodes/eglot.el | 5 ++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/doc/misc/eglot.texi b/doc/misc/eglot.texi index 8ac14372e36..962e6c914ce 100644 --- a/doc/misc/eglot.texi +++ b/doc/misc/eglot.texi @@ -1307,8 +1307,8 @@ Eglot, use @kbd{M-x package-install}. Often, a newer Eglot version exists that has fixed a longstanding bug, has more LSP features, or just better supports a particular language server. Recent Eglot versions can self-update via the command -@kbd{M-x eglot-upgrade}. This will replace any currently installed -version with the newest one available from the ELPA archives +@kbd{M-x eglot-upgrade-eglot}. This will replace any currently +installed version with the newest one available from the ELPA archives configured in @code{package-archives}. You can also update Eglot through other methods, such as diff --git a/etc/EGLOT-NEWS b/etc/EGLOT-NEWS index d2d84c5ff9e..fd0d9a24568 100644 --- a/etc/EGLOT-NEWS +++ b/etc/EGLOT-NEWS @@ -18,7 +18,14 @@ That is, to look up issue github#1234, go to https://github.com/joaotavora/eglot/issues/1234. -* Changes in Eglot bundled with Emacs 29 +* Changes in Eglot 1.12.29 (Eglot bundled with Emacs 29.1) + +** Eglot can upgrade itself to the latest version. + +The new command 'eglot-upgrade-eglot' works around behaviour in the +existing 'package-install' command and the new 'package-upgrade' +command which would prevent the user from easily grabbing the latest +version as usual. ** LSP inlay hints are now supported. Inlay hints are small text annotations not unlike diagnostics, but diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 6d1d010eb9a..df8f5f64829 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1967,7 +1967,7 @@ If it is activated, also signal textDocument/didOpen." (interactive) (info "(eglot)")) ;;;###autoload -(defun eglot-upgrade (&rest _) "Update Eglot." +(defun eglot-upgrade-eglot (&rest _) "Update Eglot to latest version." (interactive) (with-no-warnings (require 'package) @@ -1976,6 +1976,9 @@ If it is activated, also signal textDocument/didOpen." (package-delete existing t)) (package-install (cadr (assoc 'eglot package-archive-contents))))) +;;;###autoload +(define-obsolete-function-alias 'eglot-update 'eglot-upgrade-eglot "29.1") + (easy-menu-define eglot-menu nil "Eglot" `("Eglot" ;; Commands for getting information and customization. -- 2.39.2