2000-04-10 Yuuichi Teranishi <teranisi@gohome.org>
authorteranisi <teranisi>
Mon, 10 Apr 2000 15:04:18 +0000 (15:04 +0000)
committerteranisi <teranisi>
Mon, 10 Apr 2000 15:04:18 +0000 (15:04 +0000)
* wl-mime.el (wl-summary-burst-subr): Renamed from `wl-burst'.
Added argument `target' and `number'.
* tm-wl.el (wl-summary-burst-subr): New function.
(wl-summary-burst): Use it.

2000-04-10  Mito <mit@nines.nec.co.jp>

* wl-mime.el (wl-burst): New function.
(wl-summary-burst): Use it.

wl/ChangeLog
wl/tm-wl.el
wl/wl-mime.el

index 17fa2d0..97f7945 100644 (file)
@@ -1,3 +1,15 @@
+2000-04-10  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * wl-mime.el (wl-summary-burst-subr): Renamed from `wl-burst'.
+       Added argument `target' and `number'.
+       * tm-wl.el (wl-summary-burst-subr): New function.
+       (wl-summary-burst): Use it.
+
+2000-04-10  Mito <mit@nines.nec.co.jp>
+
+       * wl-mime.el (wl-burst): New function.
+       (wl-summary-burst): Use it.
+
 2000-04-07  A. SAGATA <sagata@nttvdt.hil.ntt.co.jp>
 
        * wl-address.el (wl-address-petname-add-or-change): Use e-mail address
index 885dd7e..6e14c9a 100644 (file)
@@ -4,7 +4,7 @@
 
 ;; Author: Yuuichi Teranishi <teranisi@gohome.org>
 ;; Keywords: mail, net news
-;; Time-stamp: <00/03/14 19:32:32 teranisi>
+;; Time-stamp: <00/04/10 23:47:38 teranisi>
 
 ;; This file is part of Wanderlust (Yet Another Message Interface on Emacsen).
 
@@ -114,10 +114,31 @@ By setting following-method as yank-content."
 (defalias 'wl-message-button-dispatcher 'tm:button-dispatcher)
 
 ;;; Summary
+(defun wl-summary-burst-subr (children target number)
+  ;; returns new number.
+  (let (content-type message-entity granch)
+    (while children
+      (setq content-type (mime::content-info/type (car children)))
+      (if (string-match "multipart" content-type)
+         (setq number (wl-summary-burst-subr
+                       (mime::content-info/children (car children))
+                       target
+                       number))
+       (when (string= "message/rfc822" (downcase content-type))
+         (message (format "Bursting...%s" (setq number (+ 1 number))))
+         (setq message-entity 
+               (car (mime::content-info/children (car children))))
+         (save-restriction
+           (narrow-to-region (mime::content-info/point-min message-entity)
+                             (mime::content-info/point-max message-entity))
+           (elmo-append-msg target
+                            (buffer-substring (point-min) (point-max))
+                            (std11-field-body "Message-ID")))))
+      (setq children (cdr children)))))
+
 (defun wl-summary-burst ()
   (interactive)
   (let ((raw-buf (wl-message-get-original-buffer))
-       (i 0)
        target 
        children message-entity content-type)
     (save-excursion
@@ -129,19 +150,8 @@ By setting following-method as yank-content."
       (set-buffer raw-buf)
       (setq children (mime::content-info/children mime::article/content-info))
       (message "Bursting...")
-      (while children
-       (setq content-type (mime::content-info/type (car children)))
-       (when (string= "message/rfc822" (downcase content-type))
-         (message (format "Bursting...%s" (setq i (+ 1 i))))
-         (setq message-entity 
-               (car (mime::content-info/children (car children))))
-         (save-restriction
-           (narrow-to-region (mime::content-info/point-min message-entity)
-                             (mime::content-info/point-max message-entity))
-           (elmo-append-msg target
-                            (buffer-substring (point-min) (point-max))
-                            (std11-field-body "Message-ID"))))
-       (setq children (cdr children)))
+      (when children
+       (wl-summary-burst-subr children target 0))
       (message "Bursting...done."))
     (if (elmo-folder-plugged-p target)
        (elmo-commit target))
index f1fb91b..c715fe0 100644 (file)
@@ -4,7 +4,7 @@
 
 ;; Author: Yuuichi Teranishi <teranisi@gohome.org>
 ;; Keywords: mail, net news
-;; Time-stamp: <2000-03-23 15:53:53 teranisi>
+;; Time-stamp: <2000-04-10 23:49:34 teranisi>
 
 ;; This file is part of Wanderlust (Yet Another Message Interface on Emacsen).
 
@@ -206,12 +206,35 @@ By setting following-method as yank-content."
 (defalias 'wl-message-button-dispatcher 'mime-button-dispatcher)
 
 ;;; Summary
+(defun wl-summary-burst-subr (children 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))))
+          (save-restriction
+            (narrow-to-region (mime-entity-point-min message-entity)
+                              (mime-entity-point-max message-entity))
+            (elmo-append-msg target
+                             ;;(mime-entity-content (car children))))
+                             (buffer-substring (point-min) (point-max))
+                             (std11-field-body "Message-ID")))))
+      (setq children (cdr children)))
+    number))
+
 (defun wl-summary-burst ()
   (interactive)
   (let ((raw-buf (wl-message-get-original-buffer))
-       (i 0)
-       target 
-       children message-entity content-type)
+       children message-entity content-type target)
     (save-excursion
       (setq target wl-summary-buffer-folder-name)
       (while (not (elmo-folder-writable-p target))
@@ -223,28 +246,14 @@ By setting following-method as yank-content."
        (setq message-entity (get-text-property (point-min) 'mime-view-entity)))
       (set-buffer raw-buf)
       (setq children (mime-entity-children message-entity))
-      (message "Bursting...")
-      (while children
-       (setq content-type (mime-entity-content-type (car children)))
-       (when (and (eq (cdr (assq 'type content-type)) 'message)
-                  (eq (cdr (assq 'subtype content-type)) 'rfc822))
-         (message (format "Bursting...%s" (setq i (+ 1 i))))
-         (setq message-entity
-               (car (mime-entity-children (car children))))
-         (save-restriction
-           (narrow-to-region (mime-entity-point-min message-entity)
-                             (mime-entity-point-max message-entity))
-           (elmo-append-msg target
-                            ;;(mime-entity-content (car children))))
-                            (buffer-substring (point-min) (point-max))
-                            (std11-field-body "Message-ID"))))
-       (setq children (cdr children)))
-      (message "Bursting...done."))
-    (if (elmo-folder-plugged-p target)
-       (elmo-commit target))
+      (when children
+       (message "Bursting...")
+       (wl-summary-burst-subr children target 0)
+       (message "Bursting...done."))
+      (if (elmo-folder-plugged-p target)
+         (elmo-commit target)))
     (wl-summary-sync-update3)))
 
-
 ;; internal variable.
 (defvar wl-mime-save-dir nil "Last saved directory.")
 ;;; Yet another save method.