diff options
Diffstat (limited to 'generic/proof-utils.el')
| -rw-r--r-- | generic/proof-utils.el | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/generic/proof-utils.el b/generic/proof-utils.el index 39d1c22a..c5f4960d 100644 --- a/generic/proof-utils.el +++ b/generic/proof-utils.el @@ -5,7 +5,7 @@ ;; Portions © Copyright 1994-2012 David Aspinall and University of Edinburgh ;; Portions © Copyright 2003-2018 Free Software Foundation, Inc. ;; Portions © Copyright 2001-2017 Pierre Courtieu -;; Portions © Copyright 2010, 2016 Erik Martin-Dorel +;; Portions © Copyright 2010, 2016, 2021 Erik Martin-Dorel ;; Portions © Copyright 2011-2013, 2016-2017 Hendrik Tews ;; Portions © Copyright 2015-2017 Clément Pit-Claudel @@ -101,6 +101,28 @@ Return nil if not a script buffer or if no active scripting buffer." (file-error nil)) (featurep symbol)) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Facility to upgrade all ELPA packages (including ProofGeneral) +;; + + +(defun proof-upgrade-elpa-packages () + "Upgrade all ELPA packages (using package.el)." + (interactive) + (unless (proof-try-require 'package) + (error "The package feature is not available!")) + (let ((old-async package-menu-async)) + (setq package-menu-async nil) + (package-list-packages) + (package-menu-mark-upgrades) + (let ((use-dialog-box nil)) + ;; make `y-or-n-p' show up within the minibuffer + ;; even if `proof-upgrade-elpa-packages' is called interactively + ;; to avoid any dialog-box overflow if many packages are updated + (package-menu-execute)) + (setq package-menu-async old-async))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; |
