fix: actually forward the `select' param to doom/bump-package-at-point
Also, rectify the docstring for `doom/bump-packages-in-buffer', that was an exact replica of the actual workhorse, `doom/bump-package-at-point'.
This commit is contained in:
parent
e5213f20e5
commit
60cfb383ea
1 changed files with 4 additions and 3 deletions
|
@ -119,8 +119,9 @@ Grabs the latest commit id of the package using 'git'."
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom/bump-packages-in-buffer (&optional select)
|
(defun doom/bump-packages-in-buffer (&optional select)
|
||||||
"Inserts or updates a `:pin' for the `package!' statement at point.
|
"Inserts or updates a `:pin' to all `package!' statements in current buffer.
|
||||||
Grabs the latest commit id of the package using 'git'."
|
If SELECT (prefix arg) is non-nil, prompt you to choose a specific commit for
|
||||||
|
each package."
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
|
@ -134,7 +135,7 @@ Grabs the latest commit id of the package using 'git'."
|
||||||
(and (goto-char (match-beginning 0))
|
(and (goto-char (match-beginning 0))
|
||||||
(not (plist-member (sexp-at-point) :pin))))))
|
(not (plist-member (sexp-at-point) :pin))))))
|
||||||
(condition-case e
|
(condition-case e
|
||||||
(push (doom/bump-package-at-point) packages)
|
(push (doom/bump-package-at-point select) packages)
|
||||||
(user-error (message "%s" (error-message-string e))))))
|
(user-error (message "%s" (error-message-string e))))))
|
||||||
(if packages
|
(if packages
|
||||||
(message "Updated %d packages\n- %s" (length packages) (string-join packages "\n- "))
|
(message "Updated %d packages\n- %s" (length packages) (string-join packages "\n- "))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue