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".
(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'.
'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
(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"))
(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"))))