aboutsummaryrefslogtreecommitdiff
path: root/git-email.el
diff options
context:
space:
mode:
Diffstat (limited to 'git-email.el')
-rw-r--r--git-email.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/git-email.el b/git-email.el
index e38dee6..e0fd6ac 100644
--- a/git-email.el
+++ b/git-email.el
@@ -372,12 +372,17 @@ behavior is to delete them after sending email."
"Get the body of the message in the current buffer and run COMMAND on it."
(shell-command-on-region (point-min) (point-max) command))
+(defun git-email--get-project ()
+ "Get the path to a project using `project-prompt-project-dir'."
+ (let ((project (project-prompt-project-dir)))
+ (add-to-list 'project--list (list project))
+ project))
+
;;;###autoload
(defun git-email-apply-patch (project)
"Apply the patch in the current buffer using 'git am' in PROJECT."
- (interactive (list (project-prompt-project-dir)))
+ (interactive (list (git-email--get-project)))
(let ((default-directory project))
- (push (list project) project--list)
(funcall git-email-apply-patch-function
git-email-apply-patch-command)))