emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 27bda2e 1/2: Fix regression in non-querying about mail addresses


From: Lars Ingebrigtsen
Subject: master 27bda2e 1/2: Fix regression in non-querying about mail addresses in "emacs -Q"
Date: Tue, 15 Sep 2020 09:27:56 -0400 (EDT)

branch: master
commit 27bda2e140902bf73ad458a872d8aee8b40c302c
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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).
---
 lisp/mail/emacsbug.el | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index db374f1..23b60be 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]