[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 4bc043ff45d 1/2: Avoid asking redundant question in emacsbug.el
From: |
Eli Zaretskii |
Subject: |
emacs-29 4bc043ff45d 1/2: Avoid asking redundant question in emacsbug.el |
Date: |
Sat, 3 Jun 2023 12:21:37 -0400 (EDT) |
branch: emacs-29
commit 4bc043ff45d4b02c762474791b054cb33972a2d6
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
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)
---
lisp/mail/emacsbug.el | 16 ++++++++++------
1 file 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."
(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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-29 4bc043ff45d 1/2: Avoid asking redundant question in emacsbug.el,
Eli Zaretskii <=