From: Artur Malabarba Date: Thu, 21 May 2015 16:10:40 +0000 (+0100) Subject: * lisp/emacs-lisp/package.el: Fix selected-package logic X-Git-Tag: emacs-25.0.90~2025 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a31ca4ef50efae51f9281be11cb6668789a57f08;p=emacs.git * lisp/emacs-lisp/package.el: Fix selected-package logic (package-menu-execute): Mark as selected all non-upgrade packages being installed. (package-menu--perform-transaction): Don't mark anything. --- diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 444adf0d127..79f37e7def2 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -2943,12 +2943,9 @@ objects removed." (format status-format (cl-incf i))) (force-mode-line-update) (redisplay 'force) - (package-install - ;; Don't mark as selected if it's a new version of an - ;; installed package. - pkg (and (not (package-installed-p pkg)) - (package-installed-p - (package-desc-name pkg)))))) + ;; Don't mark as selected, `package-menu-execute' already + ;; does that. + (package-install pkg 'dont-select))) ;; Once there are no more packages to install, proceed to ;; deletion. (let ((package-menu--transaction-status ":Deleting")) @@ -2995,6 +2992,10 @@ Optional argument NOQUERY non-nil means do not ask the user to confirm." (when .upgrade (format "Upgrad__ %s" (length .upgrade))) "]"))) (message (replace-regexp-in-string "__" "ing" message-template) "started") + ;; Packages being upgraded are not marked as selected. + (package--save-selected-packages + (remove-dups (append (mapcar #'package-desc-name .install) + package-selected-packages))) (package-menu--perform-transaction install-list delete-list) (when package-selected-packages (if-let ((removable (package--removable-packages)))