From 12bcc7339ee22774871c93a404ffd652a69aeec8 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 15 Jan 2004 11:00:35 +0000 Subject: [PATCH] Synch to No Gnus 200401151059. --- lisp/ChangeLog | 9 +++++++++ lisp/mm-decode.el | 6 ++++-- lisp/mm-view.el | 22 ++++++++++------------ 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 821ca6c..ea66135 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2004-01-15 Katsumi Yamaoka + + * 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 . + (mm-w3m-cid-retrieve): Simplify. + 2004-01-14 Kai Grossjohann * message.el (message-kill-to-signature): Allow prefix arg to diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el index 550c480..ae14a5c 100644 --- a/lisp/mm-decode.el +++ b/lisp/mm-decode.el @@ -1455,8 +1455,10 @@ If RECURSIVE, search recursively." 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 diff --git a/lisp/mm-view.el b/lisp/mm-view.el index d3eb051..baff3db 100644 --- a/lisp/mm-view.el +++ b/lisp/mm-view.el @@ -198,23 +198,21 @@ (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." -- 1.7.10.4