changeset 102366:93b10d2621d3

Merge from gnus--devo--0 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1561
author Miles Bader <miles@gnu.org>
date Tue, 03 Mar 2009 02:32:23 +0000
parents 21c800bf2b35
children ee6244c46da3
files lisp/gnus/ChangeLog lisp/gnus/mml.el
diffstat 2 files changed, 15 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Tue Mar 03 01:58:22 2009 +0000
+++ b/lisp/gnus/ChangeLog	Tue Mar 03 02:32:23 2009 +0000
@@ -1,3 +1,7 @@
+2009-03-02  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* mml.el (mml-insert-mime): Don't break parts that mm-uu dissected.
+
 2009-02-25  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 	* gnus-dired.el: Remove autoload for gnus-setup-message.
--- a/lisp/gnus/mml.el	Tue Mar 03 01:58:22 2009 +0000
+++ b/lisp/gnus/mml.el	Tue Mar 03 02:32:23 2009 +0000
@@ -898,10 +898,17 @@
       (unless (setq textp (equal (mm-handle-media-supertype handle) "text"))
 	(save-excursion
 	  (set-buffer (setq buffer (mml-generate-new-buffer " *mml*")))
-	  (mm-insert-part handle 'no-cache)
-	  (if (setq mmlp (equal (mm-handle-media-type handle)
-				"message/rfc822"))
-	      (mime-to-mml)))))
+	  (if (eq (mail-content-type-get (mm-handle-type handle) 'charset)
+		  'gnus-decoded)
+	      ;; A part that mm-uu dissected from a non-MIME message
+	      ;; because of `gnus-article-emulate-mime'.
+	      (progn
+		(mm-enable-multibyte)
+		(insert-buffer-substring (mm-handle-buffer handle)))
+	    (mm-insert-part handle 'no-cache)
+	    (if (setq mmlp (equal (mm-handle-media-type handle)
+				  "message/rfc822"))
+		(mime-to-mml))))))
     (if mmlp
 	(mml-insert-mml-markup handle nil t t)
       (unless (and no-markup