summaryrefslogtreecommitdiff
path: root/lisp/mail/emacsbug.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2020-09-15 15:26:55 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2020-09-15 15:26:55 +0200
commit27bda2e140902bf73ad458a872d8aee8b40c302c (patch)
tree45531de3086b67212509dd0eb766ab30b55b7515 /lisp/mail/emacsbug.el
parentd727d3dad649d1569a6babaf398439d101e282d4 (diff)
downloademacs-27bda2e140902bf73ad458a872d8aee8b40c302c.tar.gz
Fix regression in non-querying about mail addresses in "emacs -Q"
* lisp/mail/emacsbug.el (report-emacs-bug-hook): Don't query about the mail address if using an external mailer (bug#43386).
Diffstat (limited to 'lisp/mail/emacsbug.el')
-rw-r--r--lisp/mail/emacsbug.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index db374f15c27..23b60be97f1 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -446,17 +446,20 @@ and send the mail again%s."
;; questions about From header validity if the user is going to
;; use mailclient, anyway.
(when (or (and (derived-mode-p 'message-mode)
- (eq message-send-mail-function 'sendmail-query-once))
+ (eq (message-default-send-mail-function) 'sendmail-query-once))
(and (not (derived-mode-p 'message-mode))
(eq send-mail-function 'sendmail-query-once)))
- (sendmail-query-user-about-smtp)
+ (setq send-mail-function (sendmail-query-user-about-smtp))
(when (derived-mode-p 'message-mode)
- (setq message-send-mail-function (message-default-send-mail-function))))
+ (setq message-send-mail-function (message-default-send-mail-function))
+ (add-hook 'message-sent-hook
+ (lambda ()
+ (when (y-or-n-p "Save this mail sending choice?")
+ (customize-save-variable 'send-mail-function
+ send-mail-function))))))
(or report-emacs-bug-no-confirmation
;; mailclient.el does not need a valid From
- (if (derived-mode-p 'message-mode)
- (eq message-send-mail-function 'message-send-mail-with-mailclient)
- (eq send-mail-function 'mailclient-send-it))
+ (eq send-mail-function 'mailclient-send-it)
;; Not narrowing to the headers, but that's OK.
(let ((from (mail-fetch-field "From")))
(when (and (or (not from)