aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Kaludercic2022-12-25 09:53:07 +0100
committerPhilip Kaludercic2022-12-25 09:53:07 +0100
commite8b34109eeb136bdab5b970600214cf1fc92ca0c (patch)
treeb66646f225153c0bac85cee5c6bbecd0f8955b0c
parentb38e56d8a98d9488ed6ae16521334c25304153ca (diff)
downloademacs-e8b34109eeb136bdab5b970600214cf1fc92ca0c.tar.gz
emacs-e8b34109eeb136bdab5b970600214cf1fc92ca0c.zip
Reorder optional arguments to 'package-vc-install'
* lisp/emacs-lisp/package-vc.el (package-vc-install-selected-packages): Update 'package-vc-install' invocation. (package-vc-install): Reorder and update documentation.
-rw-r--r--lisp/emacs-lisp/package-vc.el14
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index 17c37aa5172..bf6c822a2b5 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -131,7 +131,7 @@ the `clone' function."
131 ((null spec) 131 ((null spec)
132 (package-vc-install name)) 132 (package-vc-install name))
133 ((stringp spec) 133 ((stringp spec)
134 (package-vc-install name nil spec)) 134 (package-vc-install name spec))
135 ((listp spec) 135 ((listp spec)
136 (package-vc--archives-initialize) 136 (package-vc--archives-initialize)
137 (package-vc--unpack (cadr pkg-descs) spec))))))) 137 (package-vc--unpack (cadr pkg-descs) spec)))))))
@@ -718,7 +718,7 @@ If no such revision can be found, return nil."
718 (line-number-at-pos nil t)))))))) 718 (line-number-at-pos nil t))))))))
719 719
720;;;###autoload 720;;;###autoload
721(defun package-vc-install (package &optional name rev backend) 721(defun package-vc-install (package &optional rev backend name)
722 "Fetch a PACKAGE and set it up for using with Emacs. 722 "Fetch a PACKAGE and set it up for using with Emacs.
723 723
724If PACKAGE is a string containing an URL, download the package 724If PACKAGE is a string containing an URL, download the package
@@ -742,7 +742,9 @@ the package's repository; this is only possible if NAME-OR-URL is a URL,
742a string. If BACKEND is omitted or nil, the function 742a string. If BACKEND is omitted or nil, the function
743uses `package-vc-heuristic-alist' to guess the backend. 743uses `package-vc-heuristic-alist' to guess the backend.
744Note that by default, a VC package will be prioritized over a 744Note that by default, a VC package will be prioritized over a
745regular package, but it will not remove a VC package." 745regular package, but it will not remove a VC package.
746
747\(fn PACKAGE &optional REV BACKEND)"
746 (interactive 748 (interactive
747 (progn 749 (progn
748 ;; Initialize the package system to get the list of package 750 ;; Initialize the package system to get the list of package
@@ -751,8 +753,10 @@ regular package, but it will not remove a VC package."
751 (let* ((name-or-url (package-vc--read-package-name 753 (let* ((name-or-url (package-vc--read-package-name
752 "Fetch and install package: " t)) 754 "Fetch and install package: " t))
753 (name (file-name-base name-or-url))) 755 (name (file-name-base name-or-url)))
754 (list name-or-url (intern (string-remove-prefix "emacs-" name)) 756 (list name-or-url
755 (and current-prefix-arg :last-release))))) 757 (and current-prefix-arg :last-release)
758 nil
759 (intern (string-remove-prefix "emacs-" name))))))
756 (package-vc--archives-initialize) 760 (package-vc--archives-initialize)
757 (cond 761 (cond
758 ((null package) 762 ((null package)