]> code.delx.au - gnu-emacs/commitdiff
Use `customize-save-variable' unconditionally, now that it works under emacs -Q
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Mon, 11 Jul 2011 20:15:04 +0000 (22:15 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Mon, 11 Jul 2011 20:15:04 +0000 (22:15 +0200)
lisp/ChangeLog
lisp/mail/sendmail.el
lisp/mail/smtpmail.el

index f1c36a9feeab3deffe62f1e687d4d2a2924b2159..af6079ec0ebbd516fca573c2594441cfe292c167 100644 (file)
@@ -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".
index 5ffc834f5331c6bc974f7ab349ae88cbcad4cdc1..fe20ad921dacbacfdfdf3dd34a0b2bb85e31914e 100644 (file)
@@ -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
index 57356f3315b5443ee561c8d89001139584e128b6..073e2fa4a3cdae21e69ac3415f4e2f12577707c1 100644 (file)
@@ -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"))))