diff options
author | yoctocell <public@yoctocell.xyz> | 2021-01-04 19:41:50 +0100 |
---|---|---|
committer | yoctocell <public@yoctocell.xyz> | 2021-01-04 20:01:43 +0100 |
commit | 7d768ca221e7d7235bee4bc6573791c39934357b (patch) | |
tree | b9483360a8c81f6fe947431db7c74a30f7dd10b2 /git-email.el | |
parent | 722a52299a35644731309156ca9e1c5e1c3d5e28 (diff) |
Fix hooks
Update docstrings for types for hooks and run them before and after every
`git-email--compose-email' call.
* git-email.el (git-email-pre-compose-email-hook):
(git-email-post-compose-email-hook):
(git-email-send-email):
Diffstat (limited to 'git-email.el')
-rw-r--r-- | git-email.el | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/git-email.el b/git-email.el index 0627639..50e5774 100644 --- a/git-email.el +++ b/git-email.el @@ -56,13 +56,13 @@ :type 'symbol) (defcustom git-email-pre-compose-email-hook nil - "A list of functions called before running `git-email--compose-message'." - :type 'hook + "A list of functions called before running `git-email--compose-email'." + :type '(hook) :group 'git-email) (defcustom git-email-post-compose-email-hook nil - "A list of functions called after running `git-email--compose-message'." - :type 'hook + "A list of functions called after running `git-email--compose-email'." + :type '(hook) :group 'git-email) (defcustom git-email-headers @@ -140,12 +140,11 @@ If no marks are found, return the filename at point." (defun git-email-send-email () "Send patch(es) to someone." (interactive) - (run-hooks 'git-email-pre-compose-email-hook) (let ((files (git-email--get-filenames))) - (prog1 (dolist (file files) - (git-email--compose-email file)) - (run-hooks 'git-email-post-compose-email-hook)))) + (run-hooks 'git-email-pre-compose-email-hook) + (git-email--compose-email file) + (run-hooks 'git-email-post-compose-email-hook)))) (defun git-email--remove-subject (header) "Remove HEADER if it is the subject." |