1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-08 23:40:24 -08:00

Use prefix argument in 'package-install-selected-packages'

* lisp/emacs-lisp/package.el (package-install-selected-packages):
When invoked with a prefix argument, skip user confirmation when
installing packages.
* etc/NEWS: Announce the prefix argument usage.  (Bug#73932)
This commit is contained in:
Sean Devlin 2024-10-28 10:34:48 -04:00 committed by Philip Kaludercic
parent b4e2d9a3af
commit c66c0942ea
No known key found for this signature in database
2 changed files with 9 additions and 3 deletions

View file

@ -2438,9 +2438,10 @@ directory."
(defun package-install-selected-packages (&optional noconfirm)
"Ensure packages in `package-selected-packages' are installed.
If some packages are not installed, propose to install them.
If optional argument NOCONFIRM is non-nil, don't ask for
confirmation to install packages."
(interactive)
If optional argument NOCONFIRM is non-nil, or when invoked with a prefix
argument, don't ask for confirmation to install packages."
(interactive "P")
(package--archives-initialize)
;; We don't need to populate `package-selected-packages' before
;; using here, because the outcome is the same either way (nothing