emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/gnus/mm-view.el


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/gnus/mm-view.el
Date: Mon, 06 Mar 2006 10:27:28 +0000

Index: emacs/lisp/gnus/mm-view.el
diff -u emacs/lisp/gnus/mm-view.el:1.25 emacs/lisp/gnus/mm-view.el:1.26
--- emacs/lisp/gnus/mm-view.el:1.25     Fri Feb 24 05:02:12 2006
+++ emacs/lisp/gnus/mm-view.el  Mon Mar  6 10:27:26 2006
@@ -213,21 +213,25 @@
 
 (defun mm-w3m-cid-retrieve-1 (url 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)))))
+    (when (consp elem)
+      (when (equal url (mm-handle-id elem))
+       (mm-insert-part elem)
+       (throw 'found-handle (mm-handle-media-type elem)))
+      (when (and (stringp (car elem))
+                (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."
   (when (string-match "\\`cid:" url)
-    (catch 'found-handle
-      (mm-w3m-cid-retrieve-1 (concat "<" (substring url (match-end 0)) ">")
-                            (with-current-buffer w3m-current-buffer
-                              gnus-article-mime-handles)))))
+    (or (catch 'found-handle
+         (mm-w3m-cid-retrieve-1
+          (setq url (concat "<" (substring url (match-end 0)) ">"))
+          (with-current-buffer w3m-current-buffer
+            gnus-article-mime-handles)))
+       (prog1
+           nil
+         (message "Failed to find \"Content-ID: %s\"" url)))))
 
 (defun mm-inline-text-html-render-with-w3m (handle)
   "Render a text/html part using emacs-w3m."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]