From: hmurata Date: Thu, 13 Sep 2001 14:20:17 +0000 (+0000) Subject: * wl-mime.el (wl-summary-burst): Extract message when content-type X-Git-Tag: wl-2_7_4~13 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=dc25732b9a8d5a94a9c1978f9246c06c9d35e4d4;p=elisp%2Fwanderlust.git * wl-mime.el (wl-summary-burst): Extract message when content-type of root entity is not only `multipart' but also `message/rfc822'. (wl-summary-burst-subr): Ditto. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 9cb581b..fe585db 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,9 @@ +2001-09-13 Hiroya Murata + + * wl-mime.el (wl-summary-burst): Extract message when content-type + of root entity is not only `multipart' but also `message/rfc822'. + (wl-summary-burst-subr): Ditto. + 2001-09-13 Yuuichi Teranishi * wl-vars.el (toplevel): Require 'custom. diff --git a/wl/wl-mime.el b/wl/wl-mime.el index 0ddba0e..ff96772 100644 --- a/wl/wl-mime.el +++ b/wl/wl-mime.el @@ -157,28 +157,26 @@ By setting following-method as yank-content." 'mime-button-dispatcher) ;;; Summary -(defun wl-summary-burst-subr (children target number) +(defun wl-summary-burst-subr (message-entity target number) ;; returns new number. - (let (content-type message-entity granch) - (while children - (setq content-type (mime-entity-content-type (car children))) - (if (eq (cdr (assq 'type content-type)) 'multipart) - (setq number (wl-summary-burst-subr - (mime-entity-children (car children)) - target - number)) - (when (and (eq (cdr (assq 'type content-type)) 'message) - (eq (cdr (assq 'subtype content-type)) 'rfc822)) - (message (format "Bursting...%s" (setq number (+ 1 number)))) - (setq message-entity - (car (mime-entity-children (car children)))) - (with-temp-buffer - (insert (mime-entity-body (car children))) - (elmo-folder-append-buffer - target - (mime-entity-fetch-field message-entity - "Message-ID"))))) - (setq children (cdr children))) + (let (content-type entity) + (setq content-type (mime-entity-content-type message-entity)) + (cond ((eq (cdr (assq 'type content-type)) 'multipart) + (dolist (entity (mime-entity-children message-entity)) + (setq number (wl-summary-burst-subr + entity + target + number)))) + ((and (eq (cdr (assq 'type content-type)) 'message) + (eq (cdr (assq 'subtype content-type)) 'rfc822)) + (message (format "Bursting...%s" (setq number (+ 1 number)))) + (setq entity + (car (mime-entity-children message-entity))) + (with-temp-buffer + (insert (mime-entity-body message-entity)) + (elmo-folder-append-buffer + target + (mime-entity-fetch-field entity "Message-ID"))))) number)) (defun wl-summary-burst () @@ -195,11 +193,10 @@ By setting following-method as yank-content." (wl-summary-set-message-buffer-or-redisplay) (with-current-buffer view-buf (setq message-entity (get-text-property (point-min) 'mime-view-entity))) - (with-current-buffer raw-buf - (setq children (mime-entity-children message-entity))) - (when children + (when message-entity (message "Bursting...") - (wl-summary-burst-subr children target 0) + (with-current-buffer raw-buf + (wl-summary-burst-subr message-entity target 0)) (message "Bursting...done")) (if (elmo-folder-plugged-p target) (elmo-folder-check target)))