summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorDmitry Gutov <dmitry@gutov.dev>2023-04-24 02:00:54 +0300
committerDmitry Gutov <dmitry@gutov.dev>2023-04-28 02:12:11 +0300
commitf965f35b33b7d722b34796823012dcd2a06ae0bd (patch)
tree534bac4f609be0967c675473aea9bbf6c6e41acd /lisp/emacs-lisp
parent31b58161bb5e2afd30ade92854241976ee71bae0 (diff)
downloademacs-f965f35b33b7d722b34796823012dcd2a06ae0bd.tar.gz
emacs-f965f35b33b7d722b34796823012dcd2a06ae0bd.tar.bz2
emacs-f965f35b33b7d722b34796823012dcd2a06ae0bd.zip
Rename all functions called package-*-update-* to package-*-upgrade-*
* lisp/emacs-lisp/package-vc.el (package-vc-upgrade-all): Rename from 'package-vc-update-all'. (package-vc-upgrade): Rename from 'package-vc-update'. * lisp/emacs-lisp/package.el (package-upgrade): Rename from 'package-update' (bug#62750). (package--upgradeable-packages): Rename from 'package--updateable-packages'. (package-upgrade-all): Rename from 'package-update-all'.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/package-vc.el18
-rw-r--r--lisp/emacs-lisp/package.el34
2 files changed, 26 insertions, 26 deletions
diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index af57095f8ce..fa9fce24acc 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -24,7 +24,7 @@
;; While packages managed by package.el use tarballs for distributing
;; the source code, this extension allows for packages to be fetched
-;; and updated directly from a version control system.
+;; and upgraded directly from a version control system.
;;
;; To install a package from source use `package-vc-install'. If you
;; aren't interested in activating a package, you can use
@@ -660,19 +660,19 @@ installed package."
#'string=)))
;;;###autoload
-(defun package-vc-update-all ()
- "Attempt to update all installed VC packages."
+(defun package-vc-upgrade-all ()
+ "Attempt to upgrade 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."))
+ (package-vc-upgrade pkg-desc))))
+ (message "Done upgrading packages."))
;;;###autoload
-(defun package-vc-update (pkg-desc)
- "Attempt to update the package PKG-DESC."
- (interactive (list (package-vc--read-package-desc "Update VC package: " t)))
+(defun package-vc-upgrade (pkg-desc)
+ "Attempt to upgrade the package PKG-DESC."
+ (interactive (list (package-vc--read-package-desc "Upgrade VC package: " t)))
;; HACK: To run `package-vc--unpack-1' after checking out the new
;; revision, we insert a hook into `vc-post-command-functions', and
;; remove it right after it ran. To avoid running the hook multiple
@@ -870,7 +870,7 @@ Rebuilding an installation means scraping for new autoload
cookies, re-compiling Emacs Lisp files, building and installing
any documentation, downloading any missing dependencies. This
command does not fetch new revisions from a remote server. That
-is the responsibility of `package-vc-update'. Interactively,
+is the responsibility of `package-vc-upgrade'. Interactively,
prompt for the name of the package to rebuild."
(interactive (list (package-vc--read-package-desc "Rebuild package: " t)))
(package-vc--unpack-1 pkg-desc (package-desc-dir pkg-desc)))
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index ffa6272dd1f..e15536c9f50 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -2263,24 +2263,24 @@ had been enabled."
(message "Package `%s' installed." name))
(message "`%s' is already installed" name))))
-(declare-function package-vc-update "package-vc" (pkg))
+(declare-function package-vc-upgrade "package-vc" (pkg))
;;;###autoload
-(defun package-update (name)
- "Update package NAME if a newer version exists."
+(defun package-upgrade (name)
+ "Upgrade package NAME if a newer version exists."
(interactive
(list (completing-read
- "Update package: " (package--updateable-packages) nil t)))
+ "Upgrade package: " (package--upgradeable-packages) nil t)))
(let* ((package (if (symbolp name)
name
(intern name)))
(pkg-desc (cadr (assq package package-alist))))
(if (package-vc-p pkg-desc)
- (package-vc-update pkg-desc)
+ (package-vc-upgrade pkg-desc)
(package-delete pkg-desc 'force)
(package-install package 'dont-select))))
-(defun package--updateable-packages ()
+(defun package--upgradeable-packages ()
;; Initialize the package system to get the list of package
;; symbols for completion.
(package--archives-initialize)
@@ -2298,23 +2298,23 @@ had been enabled."
package-alist)))
;;;###autoload
-(defun package-update-all (&optional query)
+(defun package-upgrade-all (&optional query)
"Refresh package list and upgrade all packages.
-If QUERY, ask the user before updating packages. When called
+If QUERY, ask the user before upgrading packages. When called
interactively, QUERY is always true."
(interactive (list (not noninteractive)))
(package-refresh-contents)
- (let ((updateable (package--updateable-packages)))
- (if (not updateable)
- (message "No packages to update")
+ (let ((upgradeable (package--upgradeable-packages)))
+ (if (not upgradeable)
+ (message "No packages to upgrade")
(when (and query
(not (yes-or-no-p
- (if (length= updateable 1)
- "One package to update. Do it? "
- (format "%s packages to update. Do it?"
- (length updateable))))))
- (user-error "Updating aborted"))
- (mapc #'package-update updateable))))
+ (if (length= upgradeable 1)
+ "One package to upgrade. Do it? "
+ (format "%s packages to upgrade. Do it?"
+ (length upgradeable))))))
+ (user-error "Upgrade aborted"))
+ (mapc #'package-upgrade upgradeable))))
(defun package--dependencies (pkg)
"Return a list of all dependencies PKG has.