emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r105522: Only bind `coding-system-for


From: Lars Magne Ingebrigtsen
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105522: Only bind `coding-system-for-*' around the process open call to avoid auth-source side effects.
Date: Sun, 21 Aug 2011 21:27:27 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105522
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Sun 2011-08-21 21:27:27 +0200
message:
  Only bind `coding-system-for-*' around the process open call to avoid 
auth-source side effects.
modified:
  lisp/ChangeLog
  lisp/mail/smtpmail.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-08-21 17:56:19 +0000
+++ b/lisp/ChangeLog    2011-08-21 19:27:27 +0000
@@ -1,3 +1,9 @@
+2011-08-21  Lars Magne Ingebrigtsen  <address@hidden>
+
+       * mail/smtpmail.el (smtpmail-via-smtp): Only bind
+       `coding-system-for-*' around the process open call to avoid
+       auth-source side effects.
+
 2011-08-21  Chong Yidong  <address@hidden>
 
        * term.el (term-mouse-paste): Yank primary selection (Bug#6845).

=== modified file 'lisp/mail/smtpmail.el'
--- a/lisp/mail/smtpmail.el     2011-08-21 04:11:59 +0000
+++ b/lisp/mail/smtpmail.el     2011-08-21 19:27:27 +0000
@@ -622,8 +622,6 @@
                            (and mail-specify-envelope-from
                                 (mail-envelope-from))
                            user-mail-address))
-       (coding-system-for-read 'binary)
-       (coding-system-for-write 'binary)
        response-code
        process-buffer
        result
@@ -642,21 +640,23 @@
            (erase-buffer))
 
          ;; open the connection to the server
-         (setq result
-               (open-network-stream
-                "smtpmail" process-buffer host port
-                :type smtpmail-stream-type
-                :return-list t
-                :capability-command (format "EHLO %s\r\n" (smtpmail-fqdn))
-                :end-of-command "^[0-9]+ .*\r\n"
-                :success "^2.*\n"
-                :always-query-capabilities t
-                :starttls-function
-                (lambda (capabilities)
-                  (and (string-match "-STARTTLS" capabilities)
-                       "STARTTLS\r\n"))
-                :client-certificate t
-                :use-starttls-if-possible t))
+         (let ((coding-system-for-read 'binary)
+               (coding-system-for-write 'binary))
+           (setq result
+                 (open-network-stream
+                  "smtpmail" process-buffer host port
+                  :type smtpmail-stream-type
+                  :return-list t
+                  :capability-command (format "EHLO %s\r\n" (smtpmail-fqdn))
+                  :end-of-command "^[0-9]+ .*\r\n"
+                  :success "^2.*\n"
+                  :always-query-capabilities t
+                  :starttls-function
+                  (lambda (capabilities)
+                    (and (string-match "-STARTTLS" capabilities)
+                         "STARTTLS\r\n"))
+                  :client-certificate t
+                  :use-starttls-if-possible t)))
 
          ;; If we couldn't access the server at all, we give up.
          (unless (setq process (car result))


reply via email to

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