From fbae463706f1a5e3bce206b65c7341d60a43c268 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sat, 3 Mar 2012 15:43:03 +0100 Subject: [PATCH] Further `sendmail-query-once' cleanups for sending bug reports * mail/emacsbug.el (report-emacs-bug-hook): Look at the value of `message-default-send-mail-function' and not `send-mail-function' when doing the prompting for `sendmail-query-once' before sending in Message buffers. Fixes: debbugs:10897 --- lisp/ChangeLog | 7 +++++++ lisp/mail/emacsbug.el | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index dd4650017d6..c9c12a2e861 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2012-03-03 Lars Magne Ingebrigtsen + + * mail/emacsbug.el (report-emacs-bug-hook): Look at the value of + `message-default-send-mail-function' and not `send-mail-function' + when doing the prompting for `sendmail-query-once' before sending + in Message buffers (bug#10897). + 2012-03-02 Alan Mackenzie Depessimize the handling of very large macros. diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index 50fcfceee35..aa98da87904 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el @@ -394,7 +394,11 @@ and send the mail again%s." ;; Query the user for the SMTP method, so that we can skip ;; questions about From header validity if the user is going to ;; use mailclient, anyway. - (when (eq send-mail-function 'sendmail-query-once) + (when (or (and (derived-mode-p 'message-mode) + (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) (when (derived-mode-p 'message-mode) (setq message-send-mail-function (message-default-send-mail-function)))) -- 2.11.4.GIT