+2004-01-15 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * mm-decoce.el (mm-multiple-handles): Recognize a string as a mime
+ handle, as well as a list.
+
+ * mm-view.el (mm-w3m-cid-retrieve-1): Call itself recursively.
+ Suggested by ARISAWA Akihiro <ari@mbf.sphere.ne.jp>.
+ (mm-w3m-cid-retrieve): Simplify.
+
2004-01-14 Kai Grossjohann <kai@emptydomain.de>
* message.el (message-kill-to-signature): Allow prefix arg to
parts))
(defun mm-multiple-handles (handles)
- (and (listp (car handles))
- (> (length handles) 1)))
+ (and (listp handles)
+ (> (length handles) 1)
+ (or (listp (car handles))
+ (stringp (car handles)))))
(defun mm-merge-handles (handles1 handles2)
(append
(setq w3m-display-inline-images mm-inline-text-html-with-images))
(defun mm-w3m-cid-retrieve-1 (url handle)
- (dolist (elem handle)
- (when (and (listp elem)
- (equal url (mm-handle-id elem)))
- (mm-insert-part elem)
- (throw 'found-handle (mm-handle-media-type elem)))))
+ (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)))))
(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)
- (setq url (concat "<" (substring url (match-end 0)) ">"))
(catch 'found-handle
- (let ((handles (with-current-buffer w3m-current-buffer
- gnus-article-mime-handles)))
- (if (mm-multiple-handles handles)
- (dolist (handle handles)
- (mm-w3m-cid-retrieve-1 url handle))
- (mm-w3m-cid-retrieve-1 url handles))))))
+ (mm-w3m-cid-retrieve-1 (concat "<" (substring url (match-end 0)) ">")
+ (with-current-buffer w3m-current-buffer
+ gnus-article-mime-handles)))))
(defun mm-inline-text-html-render-with-w3m (handle)
"Render a text/html part using emacs-w3m."