mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 04:18:08 +01:00
emacs: Remove notmuch-mua-message-send-hook
Currently `message-send-hook` functions are being called twice: In notmuch send common when `notmuch-mua-send-hook` functions are run (which by default includes `notmuch-mua-message-send-hook`) and in `message-send` itself. Because `message-send-hook` functions are run in `message-send` itself, we don't need also need to run them before we delegate to `message-send` Calling `notmuch-mua-message-send-hook` resulted in functions in `message-send-hook` to be called twice. This causes bugs in non-idempotent hook functions.
This commit is contained in:
parent
d127b16afe
commit
45193bab16
1 changed files with 1 additions and 6 deletions
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
(defcustom notmuch-mua-send-hook '(notmuch-mua-message-send-hook)
|
(defcustom notmuch-mua-send-hook nil
|
||||||
"Hook run before sending messages."
|
"Hook run before sending messages."
|
||||||
:type 'hook
|
:type 'hook
|
||||||
:group 'notmuch-send
|
:group 'notmuch-send
|
||||||
|
@ -601,11 +601,6 @@ unencrypted. Really send? "))))
|
||||||
(interactive)
|
(interactive)
|
||||||
(message-kill-buffer))
|
(message-kill-buffer))
|
||||||
|
|
||||||
(defun notmuch-mua-message-send-hook ()
|
|
||||||
"The default function used for `notmuch-mua-send-hook', this
|
|
||||||
simply runs the corresponding `message-mode' hook functions."
|
|
||||||
(run-hooks 'message-send-hook))
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
(define-mail-user-agent 'notmuch-user-agent
|
(define-mail-user-agent 'notmuch-user-agent
|
||||||
|
|
Loading…
Reference in a new issue