From c8e5069e6d2f9c443ab7b5184a0f42c8a8ad7127 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Sun, 13 Nov 2022 08:12:18 +0100 Subject: [PATCH] Add new command 'package-vc-update-all' * lisp/emacs-lisp/package-vc.el (package-vc-update-all): Add command (package-vc-update): Add an assertion to verify this. --- lisp/emacs-lisp/package-vc.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index 36d17c6116b..b93205e5587 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el @@ -551,6 +551,15 @@ installed package." (if installed package-alist package-archive-contents) #'string=))) +(defun package-vc-update-all () + "Attempt to update all installed VC packages." + (interactive) + (dolist (package package-alist) + (dolist (pkg-desc (cdr package)) + (when (package-vc-p pkg-desc) + (package-vc-update pkg-desc)))) + (message "Done updating packages.")) + (defun package-vc-update (pkg-desc) "Attempt to update the package PKG-DESC." (interactive (list (package-vc--read-package-desc "Update source package:"))) @@ -566,6 +575,7 @@ installed package." ;; `package-vc--unpack-1'. Ugh... ;; ;; If there is a better way to do this, it should be done. + (cl-assert (package-vc-p pkg-desc)) (letrec ((pkg-dir (package-desc-dir pkg-desc)) (empty (make-symbol "empty")) (args (list empty empty empty empty)) -- 2.39.2