From 79a886ba36837c0e13d83172ab33c1c2680c6e62 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sat, 6 May 2023 03:32:08 +0300 Subject: [PATCH] (package-upgrade): Don't remove the package from 'package-selected-packages' * lisp/emacs-lisp/package.el (package-upgrade): Don't remove the package from 'package-selected-packages', fixing the problem described in https://debbugs.gnu.org/62720#718. --- lisp/emacs-lisp/package.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 0919ce34448..bbe2b8bb4af 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -2282,7 +2282,7 @@ newer version from ELPA by using `\\\\[package-menu-mark- (pkg-desc (cadr (assq package package-alist)))) (if (package-vc-p pkg-desc) (package-vc-upgrade pkg-desc) - (package-delete pkg-desc 'force) + (package-delete pkg-desc 'force 'dont-unselect) (package-install package 'dont-select)))) (defun package--upgradeable-packages () -- 2.39.2