(wl-summary-exec-action-refile): Simplify.
authorhmurata <hmurata>
Sun, 10 Apr 2005 12:09:32 +0000 (12:09 +0000)
committerhmurata <hmurata>
Sun, 10 Apr 2005 12:09:32 +0000 (12:09 +0000)
(wl-summary-exec-action-copy): Ditto.
(wl-summary-auto-refile): Check existence of temporary mark.

wl/ChangeLog
wl/wl-action.el

index 72dce7e..ccaa38d 100644 (file)
@@ -1,3 +1,9 @@
+2005-04-10  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * wl-action.el (wl-summary-exec-action-refile): Simplify.
+       (wl-summary-exec-action-copy): Ditto.
+       (wl-summary-auto-refile): Check existence of temporary mark.
+
 2005-04-09  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
 
        * wl-summary.el (wl-summary-create-line): Use
index 0918594..1207002 100644 (file)
@@ -449,34 +449,28 @@ Return number if put mark succeed"
     (let ((start (point))
          (failures 0)
          (refile-len (length mark-list))
-         dst-msgs ; loop counter
-         result)
+         dst-msgs)
       ;; begin refile...
-      (setq dst-msgs
-           (wl-summary-make-destination-numbers-list mark-list))
+      (setq dst-msgs (wl-summary-make-destination-numbers-list mark-list))
       (goto-char start)        ; avoid moving cursor to the bottom line.
       (when (> refile-len elmo-display-progress-threshold)
        (elmo-progress-set 'elmo-folder-move-messages
                           refile-len "Refiling messages..."))
-      (while dst-msgs
-       (setq result nil)
-       (condition-case nil
-           (setq result (elmo-folder-move-messages
-                         wl-summary-buffer-elmo-folder
-                         (cdr (car dst-msgs))
-                         (wl-folder-get-elmo-folder (car (car dst-msgs)))))
-         (error nil))
-       (if result              ; succeeded.
+      (dolist (pair dst-msgs)
+       (if (condition-case nil
+               (elmo-folder-move-messages
+                wl-summary-buffer-elmo-folder
+                (cdr pair)
+                (wl-folder-get-elmo-folder (car pair)))
+             (error nil))
            (progn
              ;; update buffer.
-             (wl-summary-delete-messages-on-buffer (cdr (car dst-msgs)))
+             (wl-summary-delete-messages-on-buffer (cdr pair))
              (setq wl-summary-buffer-temp-mark-list
                    (wl-delete-associations
-                    (cdr (car dst-msgs))
+                    (cdr pair)
                     wl-summary-buffer-temp-mark-list)))
-         (setq failures
-               (+ failures (length (cdr (car dst-msgs))))))
-       (setq dst-msgs (cdr dst-msgs)))
+         (setq failures (+ failures (length (cdr pair))))))
       (elmo-progress-clear 'elmo-folder-move-messages)
       (if (<= failures 0)
          (message "Refiling messages...done"))
@@ -491,8 +485,7 @@ Return number if put mark succeed"
     (let ((start (point))
          (failures 0)
          (refile-len (length mark-list))
-         dst-msgs ; loop counter
-         result)
+         dst-msgs)
       ;; begin refile...
       (setq dst-msgs
            (wl-summary-make-destination-numbers-list mark-list))
@@ -500,26 +493,22 @@ Return number if put mark succeed"
       (when (> refile-len elmo-display-progress-threshold)
        (elmo-progress-set 'elmo-folder-move-messages
                           refile-len "Copying messages..."))
-      (while dst-msgs
-       (setq result nil)
-       (condition-case nil
-           (setq result (elmo-folder-move-messages
-                         wl-summary-buffer-elmo-folder
-                         (cdr (car dst-msgs))
-                         (wl-folder-get-elmo-folder (car (car dst-msgs)))
-                         'no-delete))
-         (error nil))
-       (if result              ; succeeded.
+      (dolist (pair dst-msgs)
+       (if (condition-case nil
+               (elmo-folder-move-messages
+                wl-summary-buffer-elmo-folder
+                (cdr pair)
+                (wl-folder-get-elmo-folder (car pair))
+                'no-delete)
+             (error nil))
            (progn
              ;; update buffer.
-             (wl-summary-delete-copy-marks-on-buffer (cdr (car dst-msgs)))
+             (wl-summary-delete-copy-marks-on-buffer (cdr pair))
              (setq wl-summary-buffer-temp-mark-list
                    (wl-delete-associations
-                    (cdr (car dst-msgs))
+                    (cdr pair)
                     wl-summary-buffer-temp-mark-list)))
-         (setq failures
-               (+ failures (length (cdr (car dst-msgs))))))
-       (setq dst-msgs (cdr dst-msgs)))
+         (setq failures (+ failures (length (cdr pair))))))
       (elmo-progress-clear 'elmo-folder-move-messages)
       (if (<= failures 0)
          (message "Copying messages...done"))
@@ -858,8 +847,9 @@ Return number if put mark succeed"
                                               (wl-thread-get-entity number))))
                                   (wl-thread-entity-get-descendant
                                    thr-entity))))
-         (when (and (not (wl-summary-no-auto-refile-message-p
-                          number))
+         (when (and (not (wl-summary-no-auto-refile-message-p number))
+                    (not (wl-summary-reserve-temp-mark-p
+                          (nth 1 (wl-summary-registered-temp-mark number))))
                     (setq dst
                           (wl-folder-get-realname
                            (wl-refile-guess