[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/gnus/mm-decode.el,v
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/gnus/mm-decode.el,v |
Date: |
Wed, 12 Mar 2008 18:30:53 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 08/03/12 18:30:52
Index: mm-decode.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/gnus/mm-decode.el,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -b -r1.53 -r1.54
--- mm-decode.el 10 Mar 2008 00:50:22 -0000 1.53
+++ mm-decode.el 12 Mar 2008 18:30:52 -0000 1.54
@@ -1127,17 +1127,15 @@
(defmacro mm-with-part (handle &rest forms)
"Run FORMS in the temp buffer containing the contents of HANDLE."
- `(let* ((handle ,handle)
- ;; The multibyteness of the temp buffer should be turned on
- ;; if inserting a multibyte string. Contrarily, the buffer's
- ;; multibyteness should be off if inserting a unibyte string,
- ;; especially if a string contains 8bit data.
- (default-enable-multibyte-characters
- (with-current-buffer (mm-handle-buffer handle)
- (mm-multibyte-p))))
+ ;; The handle-buffer's content is a sequence of bytes, not a sequence of
+ ;; chars, so the buffer should be unibyte. It may happen that the
+ ;; handle-buffer is multibyte for some reason, in which case now is a good
+ ;; time to adjust it, since we know at this point that it should
+ ;; be unibyte.
+ `(let* ((handle ,handle))
(with-temp-buffer
- (insert-buffer-substring (mm-handle-buffer handle))
(mm-disable-multibyte)
+ (insert-buffer-substring (mm-handle-buffer handle))
(mm-decode-content-transfer-encoding
(mm-handle-encoding handle)
(mm-handle-media-type handle))