* elmo-signal.el (elmo-signal-bindings): Use cons to append
[elisp/wanderlust.git] / elmo / elmo-split.el
index 310f031..1c69fe9 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
@@ -297,7 +297,7 @@ If prefix argument ARG is specified, do a reharsal (no harm)."
        (fcount 0)
        ret)
     (dolist (folder folders)
-      (setq ret (elmo-split-subr (elmo-make-folder folder) arg)
+      (setq ret (elmo-split-subr (elmo-get-folder folder) arg)
            count (+ count (car ret))
            fcount (+ fcount (cdr ret))))
     (run-hooks 'elmo-split-hook)
@@ -329,18 +329,16 @@ If prefix argument ARG is specified, do a reharsal (no harm)."
     (unwind-protect
        (progn
          (with-temp-buffer
+           (set-buffer-multibyte nil)
            (dolist (msg msgs)
              (erase-buffer)
              (when (ignore-errors
                      (elmo-message-fetch folder msg
                                          (elmo-make-fetch-strategy 'entire)
-                                         nil (current-buffer) 'unread))
+                                         'unread))
                (run-hooks 'elmo-split-fetch-hook)
                (setq elmo-split-message-entity (mime-parse-buffer))
-               (setq flags (elmo-message-flags
-                            folder
-                            msg
-                            (elmo-msgdb-get-message-id-from-buffer)))
+               (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)
@@ -361,7 +359,7 @@ If prefix argument ARG is specified, do a reharsal (no harm)."
                         ((stringp action)
                          (condition-case nil
                              (progn
-                               (setq target-folder (elmo-make-folder action))
+                               (setq target-folder (elmo-get-folder action))
                                (unless (elmo-folder-exists-p target-folder)
                                  (when
                                      (and