Contributed by David Edmondson <dme@dme.org>.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 18 Oct 2004 23:02:29 +0000 (23:02 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 18 Oct 2004 23:02:29 +0000 (23:02 +0000)
* (mm-w3m-cid-retrieve-1): Don't use recursive call excessively.

lisp/ChangeLog
lisp/mm-view.el

index 3104387..dfd12f7 100644 (file)
@@ -1,3 +1,8 @@
+2004-10-18  David Edmondson  <dme@dme.org>
+
+       * mm-view.el (mm-w3m-cid-retrieve-1): Don't use recursive call
+       excessively.
+
 2004-10-18  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * gnus-util.el (gnus-split-references): accept a nil references
index 0c5b6fc..5ff6c6d 100644 (file)
   (setq w3m-display-inline-images mm-inline-text-html-with-images))
 
 (defun mm-w3m-cid-retrieve-1 (url handle)
-  (if (mm-multiple-handles handle)
-      (dolist (elem handle)
-       (mm-w3m-cid-retrieve-1 url elem))
-    (when (and (listp handle)
-              (equal url (mm-handle-id handle)))
-      (mm-insert-part handle)
-      (throw 'found-handle (mm-handle-media-type handle)))))
+  (dolist (elem handle)
+    (when (listp elem)
+      (if (equal url (mm-handle-id elem))
+         (progn
+           (mm-insert-part elem)
+           (throw 'found-handle (mm-handle-media-type elem))))
+      (if (equal "multipart" (mm-handle-media-supertype elem))
+         (mm-w3m-cid-retrieve-1 url elem)))))
 
 (defun mm-w3m-cid-retrieve (url &rest args)
   "Insert a content pointed by URL if it has the cid: scheme."