diff options
Diffstat (limited to 'git-email.el')
-rw-r--r-- | git-email.el | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/git-email.el b/git-email.el index 801e57b..e88e2f5 100644 --- a/git-email.el +++ b/git-email.el @@ -57,6 +57,11 @@ :group 'git-email :type 'symbol) +(defcustom git-email-send-email-function 'message-send-and-exit + "The function used to send mail." + :type 'symbol + :group 'git-email) + (defcustom git-email-pre-compose-email-hook nil "A list of functions called before running `git-email--compose-email'." :type '(hook) @@ -86,6 +91,14 @@ in you git config. If the variable is not set, the 'to' address will be empty." :type '(string) :group 'git-email) +(defun git-email-send-all () + "Send all unsent emails." + (interactive) + (let ((buffers (message-buffers))) + (mapc (lambda (b) (switch-to-buffer b) + (funcall git-email-send-email-function)) + buffers))) + (defun git-email--extract-header (header) "Extract HEADER from current buffer." (goto-char (point-min)) |