+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
(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 ()
(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