diff options
author | Po Lu <luangruo@yahoo.com> | 2023-06-11 08:16:42 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2023-06-11 08:16:42 +0800 |
commit | f9cede52faf790dcf925e409e7a9588509f076a2 (patch) | |
tree | e02fd5a0c97e6223881f93e510936065e228210e /lisp/mail/emacsbug.el | |
parent | 3fcaad585ad4cb071401f3d1a9890547d24a966c (diff) | |
parent | acfd261a61a5bdc00f714aeec74635ac9ef87457 (diff) | |
download | emacs-f9cede52faf790dcf925e409e7a9588509f076a2.tar.gz emacs-f9cede52faf790dcf925e409e7a9588509f076a2.tar.bz2 emacs-f9cede52faf790dcf925e409e7a9588509f076a2.zip |
Merge remote-tracking branch 'origin/master' into feature/android
Diffstat (limited to 'lisp/mail/emacsbug.el')
-rw-r--r-- | lisp/mail/emacsbug.el | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index 68f9dcfea0b..3893e93238f 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el @@ -461,12 +461,16 @@ and send the mail again%s." (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)) - (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))) - nil t))) + ;; Don't ask the question below if we are going to ignore it in + ;; 'customize-save-variable' anyway. + (unless (or (null user-init-file) + (and (null custom-file) init-file-had-error)) + (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))) + nil t)))) (or report-emacs-bug-no-confirmation ;; mailclient.el does not need a valid From (eq send-mail-function 'mailclient-send-it) |