summaryrefslogtreecommitdiff
path: root/lisp/gnus/mm-view.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2006-03-06 10:27:26 +0000
committerMiles Bader <miles@gnu.org>2006-03-06 10:27:26 +0000
commitfe62aaccd6a3faed55d1181d1cd3495155b23068 (patch)
treea359fef3287fe36293faa6d5d50e952439399cae /lisp/gnus/mm-view.el
parent48b60fa17cc2a976656acddadccaa2d7ee52eb19 (diff)
downloademacs-fe62aaccd6a3faed55d1181d1cd3495155b23068.tar.gz
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-139
Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 49-51) - Merge from emacs--devo--0 - Update from CVS
Diffstat (limited to 'lisp/gnus/mm-view.el')
-rw-r--r--lisp/gnus/mm-view.el26
1 files changed, 15 insertions, 11 deletions
diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el
index c2b4e19f806..5972a0681a6 100644
--- a/lisp/gnus/mm-view.el
+++ b/lisp/gnus/mm-view.el
@@ -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."