From: Eli Zaretskii Date: Fri, 9 Mar 2012 11:06:44 +0000 (+0200) Subject: Make sure smtpmail produces valid mbox files with Unix EOLs for FCC. X-Git-Tag: emacs-pretest-24.0.05~134 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3f018d6d392cacb025c8de92bfabf4d7a92ade52;p=emacs.git Make sure smtpmail produces valid mbox files with Unix EOLs for FCC. lisp/mail/smtpmail.el (smtpmail-send-it): Bind coding-system-for-write to *-unix, so that FCC files are kept in valid mbox format. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index db93ab69876..e21cf0b6bba 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2012-03-09 Eli Zaretskii + + * mail/smtpmail.el (smtpmail-send-it): Bind + coding-system-for-write to *-unix, so that FCC files are kept in + valid mbox format. + 2012-03-09 Glenn Morris * files.el (dir-locals-find-file): diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 3233cff2768..8e96e2c9438 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -324,7 +324,10 @@ The list is in preference order.") (if (re-search-forward "^FCC:" delimline t) ;; Force `mail-do-fcc' to use the encoding of the mail ;; buffer to encode outgoing messages on FCC files. - (let ((coding-system-for-write smtpmail-code-conv-from)) + (let ((coding-system-for-write + ;; mbox files must have Unix EOLs. + (coding-system-change-eol-conversion + smtpmail-code-conv-from 'unix))) (mail-do-fcc delimline))) (if mail-interactive (with-current-buffer errbuf