* elmo.el (elmo-folder-detach-messages): New method.
authorteranisi <teranisi>
Thu, 17 Jul 2003 16:10:18 +0000 (16:10 +0000)
committerteranisi <teranisi>
Thu, 17 Jul 2003 16:10:18 +0000 (16:10 +0000)
* elmo-multi.el (elmo-folder-detach-messages): Define.

elmo/ChangeLog
elmo/elmo-multi.el
elmo/elmo.el

index 539f550..7488ee5 100644 (file)
@@ -1,5 +1,9 @@
 2003-07-17  Yuuichi Teranishi  <teranisi@gohome.org>
 
+       * elmo.el (elmo-folder-detach-messages): New method.
+
+       * elmo-multi.el (elmo-folder-detach-messages): Define.
+
        * elmo.el (elmo-message-copy-entity): New function.
        (elmo-message-entity-set-number): Ditto.
        (elmo-message-mark): Define as method.
index e3b5c11..e7a7aa6 100644 (file)
       (setq cur-number (+ 1 cur-number)))
     t))
 
+(luna-define-method elmo-folder-detach-messages ((folder elmo-multi-folder)
+                                                numbers)
+  (let ((flds (elmo-multi-folder-children-internal folder))
+       one-list-list
+       (cur-number 0))
+    (setq one-list-list (elmo-multi-split-numbers folder numbers))
+    (while (< cur-number (length flds))
+      (elmo-folder-detach-messages (nth cur-number flds)
+                                  (nth cur-number one-list-list))
+      (setq cur-number (+ 1 cur-number)))
+    t))
+
 (luna-define-method elmo-folder-diff ((folder elmo-multi-folder)
                                      &optional numbers)
   (elmo-multi-folder-diff folder numbers))
index 9db3215..bcda883 100644 (file)
@@ -1534,6 +1534,13 @@ If update process is interrupted, return nil.")
        (elmo-folder-set-killed-list-internal folder killed-list)
        nil))))
 
+(luna-define-generic elmo-folder-detach-messages (folder numbers)
+  "Remove messages with NUMBERS from MSGDB.")
+
+(luna-define-method elmo-folder-detach-messages ((folder elmo-folder)
+                                                numbers)
+  (elmo-msgdb-delete-msgs (elmo-folder-msgdb folder) numbers))
+
 (luna-define-generic elmo-folder-length (folder)
   "Return number of messages in the FOLDER.")