(elmo-message-field): Define.
[elisp/wanderlust.git] / elmo / elmo-split.el
index 5fb5fbe..3eafd55 100644 (file)
@@ -185,7 +185,7 @@ It can be some ACTION as in `elmo-split-rule'."
     (let (result)
       (dolist (field (if (listp field-or-fields)
                         field-or-fields
-                      (list field)))
+                      (list field-or-fields)))
        (let ((addrs (mapcar
                      'std11-address-string
                      (std11-parse-addresses-string
@@ -205,7 +205,7 @@ It can be some ACTION as in `elmo-split-rule'."
     (let (result)
       (dolist (field (if (listp field-or-fields)
                         field-or-fields
-                      (list field)))
+                      (list field-or-fields)))
        (let ((addrs (mapcar
                      'std11-address-string
                      (std11-parse-addresses-string
@@ -229,7 +229,7 @@ It can be some ACTION as in `elmo-split-rule'."
     (let (result)
       (dolist (field (if (listp field-or-fields)
                         field-or-fields
-                      (list field)))
+                      (list field-or-fields)))
        (let ((field-value (and
                            elmo-split-message-entity
                            (elmo-split-fetch-decoded-field
@@ -250,7 +250,7 @@ It can be some ACTION as in `elmo-split-rule'."
     (let (result)
       (dolist (field (if (listp field-or-fields)
                         field-or-fields
-                      (list field)))
+                      (list field-or-fields)))
        (let ((field-value (and elmo-split-message-entity
                                (elmo-split-fetch-decoded-field
                                 elmo-split-message-entity
@@ -337,16 +337,7 @@ If prefix argument ARG is specified, do a reharsal (no harm)."
                                          nil (current-buffer) 'unread))
                (run-hooks 'elmo-split-fetch-hook)
                (setq elmo-split-message-entity (mime-parse-buffer))
-               (setq flags
-                     (let ((this-id (elmo-message-field folder
-                                                        msg
-                                                        'message-id)))
-                       (and this-id
-                            (string= this-id
-                                     (elmo-msgdb-get-message-id-from-buffer))
-                            (or (elmo-message-flags folder msg)
-                                ;; message exists, but no flag.
-                                '(read)))))
+               (setq flags (elmo-message-flags-for-append folder msg))
                (catch 'terminate
                  (dolist (rule (append elmo-split-rule default-rule))
                    (setq elmo-split-match-string-internal nil)