summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/package-vc.el
diff options
context:
space:
mode:
authorPhilip Kaludercic <philipk@posteo.net>2022-11-13 17:05:20 +0100
committerPhilip Kaludercic <philipk@posteo.net>2022-11-17 20:55:04 +0100
commitd0ea38b5fe0b34cd3833d451cc56dbaadc06d51d (patch)
tree8ac0463a4c785e5ef578fdf883c63aa6d30b1f18 /lisp/emacs-lisp/package-vc.el
parent4aee4cde3aa3d9cdf4184af7c06f9ea7464c8824 (diff)
downloademacs-d0ea38b5fe0b34cd3833d451cc56dbaadc06d51d.tar.gz
emacs-d0ea38b5fe0b34cd3833d451cc56dbaadc06d51d.tar.bz2
emacs-d0ea38b5fe0b34cd3833d451cc56dbaadc06d51d.zip
Have 'vc-prepare-patch' handle prefix arguments.
* lisp/emacs-lisp/package-vc.el (package-vc-prepare-patch): Use 'vc-prepare-patch-prompt-revisions'. * lisp/vc/vc.el (vc-prepare-patch-prompt-revisions): Extract common function and handle prefix arguments. (vc-prepare-patch): Pull logic out to 'vc-prepare-patch-prompt-revisions'.
Diffstat (limited to 'lisp/emacs-lisp/package-vc.el')
-rw-r--r--lisp/emacs-lisp/package-vc.el18
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index acef568e549..9d8d3ee5f42 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -750,20 +750,20 @@ prompt for the name of the package to rebuild."
(package-vc--unpack-1 pkg-desc (package-desc-dir pkg-desc)))
;;;###autoload
-(defun package-vc-prepare-patch (pkg subject revisions)
+(defun package-vc-prepare-patch (pkg-desc subject revisions)
"Send patch for REVISIONS to maintainer of the package PKG using SUBJECT.
-SUBJECT and REVISIONS are passed on to `vc-prepare-patch', which see.
-PKG must be a package description.
-Interactively, prompt for PKG, SUBJECT, and REVISIONS. However,
-if the current buffer has marked commit log entries, REVISIONS
-are the tags of the marked entries, see `log-view-get-marked'."
+The function uses `vc-prepare-patch', passing SUBJECT and
+REVISIONS directly. PKG-DESC must be a package description.
+Interactively, prompt for PKG-DESC, SUBJECT, and REVISIONS. When
+invoked with a numerical prefix argument, use the last N
+revisions. When invoked interactively in a Log View buffer with
+marked revisions, use those."
(interactive
(list (package-vc--read-package-desc "Package to prepare a patch for: " t)
(and (not vc-prepare-patches-separately)
(read-string "Subject: " "[PATCH] " nil nil t))
- (or (log-view-get-marked)
- (vc-read-multiple-revisions "Revisions: "))))
- (vc-prepare-patch (package-maintainers pkg t)
+ (vc-prepare-patch-prompt-revisions)))
+ (vc-prepare-patch (package-maintainers pkg-desc t)
subject revisions))
(provide 'package-vc)