emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r105113: Use `customize-save-variable


From: Lars Magne Ingebrigtsen
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105113: Use `customize-save-variable' unconditionally, now that it works under emacs -Q
Date: Mon, 11 Jul 2011 22:15:04 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105113
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Mon 2011-07-11 22:15:04 +0200
message:
  Use `customize-save-variable' unconditionally, now that it works under emacs 
-Q
modified:
  lisp/ChangeLog
  lisp/mail/sendmail.el
  lisp/mail/smtpmail.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-07-11 20:12:07 +0000
+++ b/lisp/ChangeLog    2011-07-11 20:15:04 +0000
@@ -1,5 +1,11 @@
 2011-07-11  Lars Magne Ingebrigtsen  <address@hidden>
 
+       * 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".

=== modified file 'lisp/mail/sendmail.el'
--- a/lisp/mail/sendmail.el     2011-07-08 17:02:01 +0000
+++ b/lisp/mail/sendmail.el     2011-07-11 20:15:04 +0000
@@ -159,8 +159,6 @@
 (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 @@
                        '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

=== modified file 'lisp/mail/smtpmail.el'
--- a/lisp/mail/smtpmail.el     2011-07-08 07:42:21 +0000
+++ b/lisp/mail/smtpmail.el     2011-07-11 20:15:04 +0000
@@ -587,8 +587,6 @@
 (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 @@
                (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"))))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]