diff options
author | yoctocell <public@yoctocell.xyz> | 2021-01-05 22:41:04 +0100 |
---|---|---|
committer | yoctocell <public@yoctocell.xyz> | 2021-01-05 22:41:04 +0100 |
commit | 40a6a9868af71a982686063c71d73170561b57e8 (patch) | |
tree | 30554f31ba232ce79972b17bcf45ddff9191d8a9 /git-email.el | |
parent | dd94ac8152e817e5f8fce622de2a4aa0c89df9bb (diff) |
Add function to apply patch in current buffer
* git-email.el (git-email-apply-patch):
Diffstat (limited to 'git-email.el')
-rw-r--r-- | git-email.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/git-email.el b/git-email.el index 954eafa..801e57b 100644 --- a/git-email.el +++ b/git-email.el @@ -150,6 +150,14 @@ If no marks are found, return the filename at point." (message "Not a supported major mode")))) ;;;###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))) + (let ((default-directory project)) + (push (list project) project--list) + (shell-command-on-region (point-min) (point-max) "git am"))) + +;;;###autoload (defun git-email-send-email () "Send patch(es) to someone." (interactive) |