diff options
-rw-r--r-- | git-email.el | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/git-email.el b/git-email.el index 210a6de..c728a8f 100644 --- a/git-email.el +++ b/git-email.el @@ -82,9 +82,9 @@ not set, the 'to' address will be empty." :type 'hook :group 'git-email) -(defcustom git-email-get-to-address-function +(defcustom git-email-get-to-address-functions '(git-email--get-to-address) - "Function to run to get the \“to\" address of a message." + "Functions to run to get the \"to\" address of a message." :type 'hook :group 'git-email) @@ -174,10 +174,9 @@ If no marks are found, return the filename at point." (defun git-email--get-files () "Return list of filenames for marked files in `vc-dir'. If no marks are found, return the filename at point." - (let ((files (or (seq-some (lambda (fn) - (funcall fn)) - git-email-get-files-functions) - (git-email--minibuffer-file)))) + (let ((files (or (run-hook-with-args-until-success + 'git-email-get-files-functions) + (git-email--minibuffer-file)))) (when (mapcar #'git-email--check-file files) files))) @@ -255,7 +254,8 @@ them into the message buffer." (lambda (header) (not (string-equal (car (cdr header)) ""))) headers)) - (sendemail-to (funcall git-email-get-to-address-function)) + (sendemail-to (run-hook-with-args-until-success + 'git-email-get-to-address-functions)) ;; Get 'to' address from git. (to (if (string-equal sendemail-to "") "*** TO ADDRESS HERE ***" @@ -333,9 +333,8 @@ default behavior is to delete them after sending the message." (completing-read-multiple "Args: " git-email-format-patch-extra-args nil nil git-email-format-patch-default-args))) - (or (seq-some (lambda (fn) - (funcall fn)) - git-email-get-revision-functions) + (or (run-hook-with-args-until-success + 'git-email-get-revision-functions) (git-email--minibuffer-get-revision)) current-prefix-arg)) ;; List of patches generated, the last element is an empty string |