summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/package-vc.el
diff options
context:
space:
mode:
authorPhilip Kaludercic <philipk@posteo.net>2022-08-11 13:23:51 +0200
committerPhilip Kaludercic <philipk@posteo.net>2022-08-11 13:23:51 +0200
commitf5bb6b01318fe3a21493992e94908cf685e9b26b (patch)
treeeeeebdc4ca8b94fcdb322bdbcbd6aa85600ef5ca /lisp/emacs-lisp/package-vc.el
parent9ddc23cd3438cba85b8a41e78d335c0d5071a212 (diff)
downloademacs-f5bb6b01318fe3a21493992e94908cf685e9b26b.tar.gz
emacs-f5bb6b01318fe3a21493992e94908cf685e9b26b.tar.bz2
emacs-f5bb6b01318fe3a21493992e94908cf685e9b26b.zip
Allow updating source packages
* lisp/emacs-lisp/package-vc.el (package-vc-update): Add new function. * lisp/emacs-lisp/package.el (package-update): Use 'package-vc-update'.
Diffstat (limited to 'lisp/emacs-lisp/package-vc.el')
-rw-r--r--lisp/emacs-lisp/package-vc.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index 0f5ee4305a8..04821d43c4a 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -227,6 +227,12 @@ The output is written out into PKG-FILE."
t))))
package-archive-contents))
+(defun package-vc-update (pkg-desc)
+ "Attempt to update the packager PKG-DESC."
+ (let ((default-directory (package-desc-dir pkg-desc)))
+ (with-demoted-errors "Error during package update: %S"
+ (vc-pull))))
+
(defun package-vc-fetch (name-or-url &optional name rev)
"Fetch the source of NAME-OR-URL.
If NAME-OR-URL is a URL, then the package will be downloaded from