# HG changeset patch # User Eli Zaretskii # Date 1279274377 -10800 # Node ID d03ee75f7be2946cff05063566a8636650ce929c # Parent a6e068e858a454acdb41a77297737d8a2ae1a1a4 mail/rmailmm.el (rmail-mime-save): Make the temp buffer unibyte, so compressed attachments are not compressed again. See http://lists.gnu.org/archive/html/emacs-devel/2010-07/msg00599.html diff -r a6e068e858a4 -r d03ee75f7be2 lisp/ChangeLog --- a/lisp/ChangeLog Wed Jul 14 19:53:42 2010 +0200 +++ b/lisp/ChangeLog Fri Jul 16 12:59:37 2010 +0300 @@ -1,3 +1,8 @@ +2010-07-16 Eli Zaretskii + + * mail/rmailmm.el (rmail-mime-save): Make the temp buffer + unibyte, so compressed attachments are not compressed again. + 2010-07-14 Jan Djärv * xt-mouse.el (xterm-mouse-event-read): Fix for characters > 127 diff -r a6e068e858a4 -r d03ee75f7be2 lisp/mail/rmailmm.el --- a/lisp/mail/rmailmm.el Wed Jul 14 19:53:42 2010 +0200 +++ b/lisp/mail/rmailmm.el Fri Jul 16 12:59:37 2010 +0300 @@ -112,6 +112,10 @@ (file-name-as-directory filename)))) (with-temp-buffer (set-buffer-file-coding-system 'no-conversion) + ;; Needed e.g. by jka-compr, so if the attachment is a compressed + ;; file, the magic signature compares equal with the unibyte + ;; signature string recorded in jka-compr-compression-info-list. + (set-buffer-multibyte nil) (insert data) (write-region nil nil filename nil nil nil t))))