]> git.eshelyaron.com Git - emacs.git/commitdiff
Tweak querying in package-update-all
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 14 May 2022 01:10:46 +0000 (03:10 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 14 May 2022 01:10:46 +0000 (03:10 +0200)
* lisp/emacs-lisp/package.el (package-update-all): Reverse the
QUERY logic to make calling more regular.

lisp/emacs-lisp/package.el

index 7f72caba65decbb8579156aaa26218805639f0e6..b2a01248e80c33ca88ba4a634c406a6f04fed348 100644 (file)
@@ -2164,14 +2164,15 @@ to install it but still mark it as selected."
               (package-desc-priority-version (cadr available))))))
     package-alist)))
 
-(defun package-update-all (&optional inhibit-queries)
-  "Upgrade all packages."
-  (interactive "P")
+(defun package-update-all (&optional query)
+  "Upgrade all packages.
+If QUERY, ask the user before updating packages.  Interactively,
+QUERY is always true."
+  (interactive (list t))
   (let ((updateable (package--updateable-packages)))
     (if (not updateable)
         (message "No packages to update")
-      (when (and (not inhibit-queries)
-                 (not noninteractive)
+      (when (and query
                  (not (yes-or-no-p
                        (if (length= updateable 1)
                            "One package to update.  Do it? "