From: teranisi Date: Thu, 17 Jul 2003 16:10:18 +0000 (+0000) Subject: * elmo.el (elmo-folder-detach-messages): New method. X-Git-Tag: elmo-mark-restart~34 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=b5dee3b70e8e94f968c434ded8abf26db9ce7f61;p=elisp%2Fwanderlust.git * elmo.el (elmo-folder-detach-messages): New method. * elmo-multi.el (elmo-folder-detach-messages): Define. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 539f550..7488ee5 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,5 +1,9 @@ 2003-07-17 Yuuichi Teranishi + * 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. diff --git a/elmo/elmo-multi.el b/elmo/elmo-multi.el index e3b5c11..e7a7aa6 100644 --- a/elmo/elmo-multi.el +++ b/elmo/elmo-multi.el @@ -220,6 +220,18 @@ (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)) diff --git a/elmo/elmo.el b/elmo/elmo.el index 9db3215..bcda883 100644 --- a/elmo/elmo.el +++ b/elmo/elmo.el @@ -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.")