]> git.eshelyaron.com Git - emacs.git/commitdiff
mail/rmailmm.el (rmail-mime-save): Make the temp buffer unibyte,
authorEli Zaretskii <eliz@gnu.org>
Fri, 16 Jul 2010 09:59:37 +0000 (12:59 +0300)
committerEli Zaretskii <eliz@gnu.org>
Fri, 16 Jul 2010 09:59:37 +0000 (12:59 +0300)
 so compressed attachments are not compressed again.

 See http://lists.gnu.org/archive/html/emacs-devel/2010-07/msg00599.html

lisp/ChangeLog
lisp/mail/rmailmm.el

index b44d00d72d96b8f6ab1fe4d1e40394bf59f85f93..bdbc96a5afe029ae63450b9a8ce9daf635aad8e6 100644 (file)
@@ -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
index 415bc20cf504a40c7e661a5ceeed81afe03492e7..e8ca11ee349d345658c31492dce5d001a596d838 100644 (file)
@@ -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))))