changeset 109330:d03ee75f7be2

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
author Eli Zaretskii <eliz@gnu.org>
date Fri, 16 Jul 2010 12:59:37 +0300
parents a6e068e858a4
children 0c54c271bb98
files lisp/ChangeLog lisp/mail/rmailmm.el
diffstat 2 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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  <eliz@gnu.org>
+
+	* mail/rmailmm.el (rmail-mime-save): Make the temp buffer
+	unibyte, so compressed attachments are not compressed again.
+
 2010-07-14  Jan Djärv  <jan.h.d@swipnet.se>
 
 	* xt-mouse.el (xterm-mouse-event-read): Fix for characters > 127
--- 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))))