summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <larsi@gnus.org>2011-07-11 22:15:04 +0200
committerLars Magne Ingebrigtsen <larsi@gnus.org>2011-07-11 22:15:04 +0200
commit9988520a263e1cd78b1be5d182a6cc38cf307f5f (patch)
tree55777fa537497e90fde64cbd2860cdbdfd013394
parenteab5dc0727f022842e4b4eadd4b0ab0ce4b12939 (diff)
downloademacs-9988520a263e1cd78b1be5d182a6cc38cf307f5f.tar.gz
Use `customize-save-variable' unconditionally, now that it works under emacs -Q
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/mail/sendmail.el6
-rw-r--r--lisp/mail/smtpmail.el10
3 files changed, 9 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f1c36a9feea..af6079ec0eb 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,11 @@
2011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
+ * mail/sendmail.el (sendmail-query-once): Use
+ `customize-save-variable' unconditionally, now that it works under
+ emacs -Q.
+
+ * mail/smtpmail.el (smtpmail-query-smtp-server): Ditto.
+
* cus-edit.el (custom-file): Take an optional no-error variable.
(customize-save-variable): Set the variable, and give a warning if
running under "emacs -q".
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 5ffc834f533..fe20ad921da 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -159,8 +159,6 @@ This is used by the default mail-sending commands. See also
(defvar sendmail-query-once-function 'query
"Either a function to send email, or the symbol `query'.")
-(autoload 'custom-file "cus-edit")
-
;;;###autoload
(defun sendmail-query-once ()
"Send an email via `sendmail-query-once-function'.
@@ -198,9 +196,7 @@ function to use, and then save that choice."
'smtpmail-send-it
default))
(kill-buffer (current-buffer))))))
- (if (ignore-errors (custom-file))
- (customize-save-variable 'sendmail-query-once-function function)
- (setq sendmail-query-once-function function))))
+ (customize-save-variable 'sendmail-query-once-function function)))
(funcall sendmail-query-once-function))
;;;###autoload
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 57356f3315b..073e2fa4a3c 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -587,8 +587,6 @@ The list is in preference order.")
(defun smtpmail-response-text (response)
(mapconcat 'identity (cdr response) "\n"))
-(autoload 'custom-file "cus-edit")
-
(defun smtpmail-query-smtp-server ()
(let ((server (read-string "Outgoing SMTP mail server: "))
(ports '(587 "smtp"))
@@ -600,12 +598,8 @@ The list is in preference order.")
(setq port (pop ports)))
(when (setq stream (ignore-errors
(open-network-stream "smtp" nil server port)))
- (if (ignore-errors (custom-file))
- (progn
- (customize-save-variable 'smtpmail-smtp-server server)
- (customize-save-variable 'smtpmail-smtp-service port))
- (setq smtpmail-smtp-server server
- smtpmail-smtp-service port))
+ (customize-save-variable 'smtpmail-smtp-server server)
+ (customize-save-variable 'smtpmail-smtp-service port)
(delete-process stream)))
(unless smtpmail-smtp-server
(error "Couldn't contact an SMTP server"))))