* wl-summary.el (wl-summary-erase-subr): New function. Use
authoryoichi <yoichi>
Mon, 20 Jan 2003 07:44:46 +0000 (07:44 +0000)
committeryoichi <yoichi>
Mon, 20 Jan 2003 07:44:46 +0000 (07:44 +0000)
elmo-folder-move-messages.
(wl-summary-erase): Call it.
(wl-summary-target-mark-erase): Ditto.

wl/ChangeLog
wl/wl-summary.el

index cdefff6..950f830 100644 (file)
@@ -1,3 +1,10 @@
+2003-01-20  Yoichi NAKAYAMA  <yoichi@eken.phys.nagoya-u.ac.jp>
+
+       * wl-summary.el (wl-summary-erase-subr): New function. Use
+       elmo-folder-move-messages.
+       (wl-summary-erase): Call it.
+       (wl-summary-target-mark-erase): Ditto.
+
 2003-01-14  Yoichi NAKAYAMA  <yoichi@eken.phys.nagoya-u.ac.jp>
 
        * wl-summary.el (wl-summary-exec-subr): Unset wl-message-buffer if
index f67c873..bbeb61e 100644 (file)
@@ -3160,10 +3160,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER."
                   (format "Erase \"%s\" without moving it to trash? "
                           (truncate-string subject 30)))
              (wl-summary-unmark msg-num)
-             (elmo-folder-delete-messages wl-summary-buffer-elmo-folder
-                                          (list msg-num))
-             (wl-summary-delete-messages-on-buffer (list msg-num))
-             (save-excursion (wl-summary-sync nil "update"))))))
+             (wl-summary-erase-subr (list msg-num))))))
     (message "Read-only folder.")))
 
 (defun wl-summary-target-mark-erase ()
@@ -3173,14 +3170,21 @@ If optional argument NUMBER is specified, mark message specified by NUMBER."
          (message "No marked message.")
        (when (yes-or-no-p
               "Erase all marked messages without moving them to trash? ")
-         (elmo-folder-delete-messages wl-summary-buffer-elmo-folder
-                                      wl-summary-buffer-target-mark-list)
-         (wl-summary-delete-messages-on-buffer
-          wl-summary-buffer-target-mark-list)
-         (setq wl-summary-buffer-target-mark-list nil)
-         (save-excursion (wl-summary-sync nil "update"))))
+         (wl-summary-erase-subr wl-summary-buffer-target-mark-list)
+         (setq wl-summary-buffer-target-mark-list nil)))
     (message "Read-only folder.")))
 
+(defun wl-summary-erase-subr (msgs)
+  (elmo-folder-move-messages wl-summary-buffer-elmo-folder msgs 'null)
+  (wl-summary-delete-messages-on-buffer msgs)
+  ;; message buffer is not up-to-date
+  (unless (and wl-message-buffer
+              (eq (wl-summary-message-number)
+                  (with-current-buffer wl-message-buffer
+                    wl-message-buffer-cur-number)))
+    (wl-summary-toggle-disp-msg 'off)
+    (setq wl-message-buffer nil)))
+
 (defun wl-summary-read-folder (default &optional purpose ignore-error
                                no-create init)
   (let ((fld (completing-read