]> git.eshelyaron.com Git - emacs.git/commitdiff
Bind coding-system-for-* to binary to possibly avoid line encoding
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Mon, 27 Jun 2011 00:02:15 +0000 (02:02 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Mon, 27 Jun 2011 00:02:15 +0000 (02:02 +0200)
issues on Windows (among other things).

lisp/ChangeLog
lisp/mail/smtpmail.el

index 98b5ac37ef28af48a0c93c024865b53084fc09b6..294a22f40f8f716b47bbe42a4eaf04ffca723cff 100644 (file)
@@ -1,3 +1,9 @@
+2011-06-27  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * mail/smtpmail.el (smtpmail-via-smtp): Bind coding-system-for-*
+       to binary to possibly avoid line encoding issues on Windows (among
+       other things).
+
 2011-06-26  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * net/network-stream.el (open-network-stream): Return an :error
index 4a3cb90657014ca888a1c863a9a4deb28fbdda26..ece4de669d0ce0a68f1d507bce0b7875876113a0 100644 (file)
@@ -488,9 +488,9 @@ The list is in preference order.")
             (secret . "SMTP password for %u@%h: ")))
          (auth-info (car
                     (auth-source-search
-                     :max 1
                      :host host
                      :port port
+                     :max 1
                      :require (and ask-for-password
                                    '(:user :secret))
                      :create ask-for-password)))
@@ -615,6 +615,8 @@ The list is in preference order.")
                            (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
@@ -629,6 +631,7 @@ The list is in preference order.")
 
          ;; clear the trace buffer of old output
          (with-current-buffer process-buffer
+           (set-buffer-multibyte nil)
            (setq buffer-undo-list t)
            (erase-buffer))