summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Kaludercic <philipk@posteo.net>2023-05-10 08:58:34 +0200
committerPhilip Kaludercic <philipk@posteo.net>2023-05-12 09:41:55 +0200
commitba2c76fa2bc3aabfda7d1d09cc5148f3f9d8e08e (patch)
tree01f120f447734334ed69b21a2a729b529eeb48e0
parent6fa9332e7cdb28c3990f8d1444b02b65791713d6 (diff)
downloademacs-ba2c76fa2bc3aabfda7d1d09cc5148f3f9d8e08e.tar.gz
Ensure that package menu respects 'package-install-upgrade-built-in'
* lisp/emacs-lisp/package.el (package-menu--find-upgrades): Check if built-in packages can be upgraded if 'package-install-upgrade-built-in' is non-nil.
-rw-r--r--lisp/emacs-lisp/package.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index bbe2b8bb4af..c684840ab7e 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -3731,7 +3731,7 @@ corresponding to the newer version."
;; ENTRY is (PKG-DESC [NAME VERSION STATUS DOC])
(let ((pkg-desc (car entry))
(status (aref (cadr entry) 2)))
- (cond ((member status '("installed" "dependency" "unsigned" "external"))
+ (cond ((member status '("installed" "dependency" "unsigned" "external" "built-in"))
(push pkg-desc installed))
((member status '("available" "new"))
(setq available (package--append-to-alist pkg-desc available))))))
@@ -3742,6 +3742,8 @@ corresponding to the newer version."
(and avail-pkg
(version-list-< (package-desc-priority-version pkg-desc)
(package-desc-priority-version avail-pkg))
+ (xor (not package-install-upgrade-built-in)
+ (package--active-built-in-p pkg-desc))
(push (cons name avail-pkg) upgrades))))
upgrades))