]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/package.el: Improve transaction y-or-n prompt
authorArtur Malabarba <bruce.connor.am@gmail.com>
Sun, 12 Apr 2015 14:11:08 +0000 (15:11 +0100)
committerArtur Malabarba <bruce.connor.am@gmail.com>
Sun, 12 Apr 2015 15:16:06 +0000 (16:16 +0100)
(package-menu--prompt-transaction-p): Prompt for "Delete" first,
"Upgrade" last, and use capitalized instead of all-caps.

lisp/emacs-lisp/package.el

index 92d71bae222bc503362d43de16ba35ffb2044795..6fb5ba45468a84655a70039f4a542443dc122564 100644 (file)
@@ -2780,15 +2780,15 @@ nil, but not both."
          (del (cl-set-difference delete upg :key #'package-desc-name)))
     (y-or-n-p
      (concat
-      (when upg "UPGRADE ")
-      (package-menu--list-to-prompt upg)
-      (when (and upg ins)
-        (if del "; " "; and "))
-      (when ins "INSTALL ")
-      (package-menu--list-to-prompt ins)
-      (when (and del (or ins upg)) "; and ")
-      (when del "DELETE ")
+      (when del "Delete ")
       (package-menu--list-to-prompt del)
+      (when (and del ins)
+        (if upg "; " "; and "))
+      (when ins "Install ")
+      (package-menu--list-to-prompt ins)
+      (when (and upg (or ins del)) "; and ")
+      (when upg "Upgrade ")
+      (package-menu--list-to-prompt upg)
       "? "))))
 
 (defun package-menu--perform-transaction (install-list delete-list &optional async)