From: Philip Kaludercic Date: Sun, 13 Nov 2022 07:12:18 +0000 (+0100) Subject: Add new command 'package-vc-update-all' X-Git-Tag: emacs-29.0.90~1616^2~75 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c8e5069e6d2f9c443ab7b5184a0f42c8a8ad7127;p=emacs.git 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. --- 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))