From: Lars Ingebrigtsen Date: Sat, 14 May 2022 01:10:46 +0000 (+0200) Subject: Tweak querying in package-update-all X-Git-Tag: emacs-29.0.90~1910^2~714 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=221031b4ffdd10ee8a07b4aaf42350a057d1c570;p=emacs.git Tweak querying in package-update-all * lisp/emacs-lisp/package.el (package-update-all): Reverse the QUERY logic to make calling more regular. --- diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 7f72caba65d..b2a01248e80 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -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? "