2004-04-10 Yoichi NAKAYAMA <yoichi@geiin.org>
+ * elmo-split.el (elmo-split-subr): Append message with flag.
+
* elmo-localdir.el (elmo-folder-append-buffer): Fix interface.
* elmo-flag.el (elmo-folder-append-buffer): Ditto.
* elmo-maildir.el (elmo-folder-append-buffer): Ditto.
;;
;;; Code:
+(eval-when-compile (require 'cl))
(require 'elmo)
(eval-when-compile
(fcount 0)
(default-rule `((t ,elmo-split-default-action)))
msgs action target-folder failure delete-substance
- record-log log-string)
+ record-log log-string flags)
(message "Splitting...")
(elmo-folder-open-internal folder)
(setq msgs (elmo-folder-list-messages folder))
nil (current-buffer) 'unread))
(run-hooks 'elmo-split-fetch-hook)
(setq elmo-split-message-entity (mime-parse-buffer))
+ (setq flags (elmo-message-flags folder msg))
(catch 'terminate
(dolist (rule (append elmo-split-rule default-rule))
(setq elmo-split-match-string-internal nil)
action)))
(elmo-folder-create target-folder)))
(elmo-folder-open-internal target-folder)
- (elmo-folder-append-buffer target-folder)
+ (elmo-folder-append-buffer target-folder (or flags '(read)))
(elmo-folder-close-internal target-folder))
(error (setq failure t)
(incf fcount)))