From: Eli Zaretskii Date: Fri, 16 Jul 2010 09:59:37 +0000 (+0300) Subject: mail/rmailmm.el (rmail-mime-save): Make the temp buffer unibyte, X-Git-Tag: emacs-pretest-23.2.90~139^2~54 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=134a027f69b980b37204a93775116949c40166d1;p=emacs.git 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 --git a/lisp/ChangeLog b/lisp/ChangeLog index b44d00d72d9..bdbc96a5afe 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index 415bc20cf50..e8ca11ee349 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el @@ -112,6 +112,10 @@ automatically display the image in the buffer." (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))))