diff lisp/gnus/mm-decode.el @ 69949:d0312c3f2374

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-214 Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 83) - Update from CVS
author Miles Bader <miles@gnu.org>
date Wed, 12 Apr 2006 05:23:27 +0000
parents ab0b847baba4
children 322c5c5027dc c156f6a9e7b5
line wrap: on
line diff
--- a/lisp/gnus/mm-decode.el	Wed Apr 12 05:11:12 2006 +0000
+++ b/lisp/gnus/mm-decode.el	Wed Apr 12 05:23:27 2006 +0000
@@ -672,7 +672,14 @@
     (mailcap-parse-mailcaps)
     (if (mm-handle-displayed-p handle)
 	(mm-remove-part handle)
-      (let* ((type (mm-handle-media-type handle))
+      (let* ((ehandle (if (equal (mm-handle-media-type handle)
+				 "message/external-body")
+			  (progn
+			    (unless (mm-handle-cache handle)
+			      (mm-extern-cache-contents handle))
+			    (mm-handle-cache handle))
+			handle))
+	     (type (mm-handle-media-type ehandle))
 	     (method (mailcap-mime-info type))
 	     (filename (or (mail-content-type-get
 			    (mm-handle-disposition handle) 'filename)
@@ -680,8 +687,8 @@
 			    (mm-handle-type handle) 'name)
 			   "<file>"))
 	     (external mm-enable-external))
-	(if (and (mm-inlinable-p handle)
-		 (mm-inlined-p handle))
+	(if (and (mm-inlinable-p ehandle)
+		 (mm-inlined-p ehandle))
 	    (progn
 	      (forward-line 1)
 	      (mm-display-inline handle)
@@ -689,7 +696,7 @@
 	  (when (or method
 		    (not no-default))
 	    (if (and (not method)
-		     (equal "text" (car (split-string type))))
+		     (equal "text" (car (split-string type "/"))))
 		(progn
 		  (forward-line 1)
 		  (mm-insert-inline handle (mm-get-part handle))