aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2023-06-03 19:20:23 +0300
committerEli Zaretskii2023-06-03 19:20:23 +0300
commit4bc043ff45d4b02c762474791b054cb33972a2d6 (patch)
treec198357baa42bf0600bc83977c3edbab0afb835f
parent583ba1db7ee31349eeef94f9dcb6e43f860a32eb (diff)
downloademacs-4bc043ff45d4b02c762474791b054cb33972a2d6.tar.gz
emacs-4bc043ff45d4b02c762474791b054cb33972a2d6.zip
Avoid asking redundant question in emacsbug.el
* lisp/mail/emacsbug.el (report-emacs-bug-hook): Don't ask the question about saving email setup if we cannot save it anyway. (Bug#63816)
-rw-r--r--lisp/mail/emacsbug.el16
1 files changed, 10 insertions, 6 deletions
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index f686c04536c..7a66089aec9 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -455,12 +455,16 @@ and send the mail again%s."
455 (setq send-mail-function (sendmail-query-user-about-smtp)) 455 (setq send-mail-function (sendmail-query-user-about-smtp))
456 (when (derived-mode-p 'message-mode) 456 (when (derived-mode-p 'message-mode)
457 (setq message-send-mail-function (message-default-send-mail-function)) 457 (setq message-send-mail-function (message-default-send-mail-function))
458 (add-hook 'message-sent-hook 458 ;; Don't ask the question below if we are going to ignore it in
459 (lambda () 459 ;; 'customize-save-variable' anyway.
460 (when (y-or-n-p "Save this mail sending choice?") 460 (unless (or (null user-init-file)
461 (customize-save-variable 'send-mail-function 461 (and (null custom-file) init-file-had-error))
462 send-mail-function))) 462 (add-hook 'message-sent-hook
463 nil t))) 463 (lambda ()
464 (when (y-or-n-p "Save this mail sending choice?")
465 (customize-save-variable 'send-mail-function
466 send-mail-function)))
467 nil t))))
464 (or report-emacs-bug-no-confirmation 468 (or report-emacs-bug-no-confirmation
465 ;; mailclient.el does not need a valid From 469 ;; mailclient.el does not need a valid From
466 (eq send-mail-function 'mailclient-send-it) 470 (eq send-mail-function 'mailclient-send-it)