diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-05-14 03:10:46 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-05-14 03:10:46 +0200 |
commit | 221031b4ffdd10ee8a07b4aaf42350a057d1c570 (patch) | |
tree | e6102c8b25bb3b3d4c72a6cb4a716a6b758983da /lisp/emacs-lisp | |
parent | 1dec6548b824c7d4d90ad614040fa6119ebf984a (diff) | |
download | emacs-221031b4ffdd10ee8a07b4aaf42350a057d1c570.tar.gz emacs-221031b4ffdd10ee8a07b4aaf42350a057d1c570.tar.bz2 emacs-221031b4ffdd10ee8a07b4aaf42350a057d1c570.zip |
Tweak querying in package-update-all
* lisp/emacs-lisp/package.el (package-update-all): Reverse the
QUERY logic to make calling more regular.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/package.el | 11 |
1 files changed, 6 insertions, 5 deletions
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? " |