From ff4786ee6c0e14f99ac42720c349a548328ad039 Mon Sep 17 00:00:00 2001 From: yoichi Date: Mon, 20 Jan 2003 07:44:46 +0000 Subject: [PATCH] * 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. --- wl/ChangeLog | 7 +++++++ wl/wl-summary.el | 24 ++++++++++++++---------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index cdefff6..950f830 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,10 @@ +2003-01-20 Yoichi NAKAYAMA + + * 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 * wl-summary.el (wl-summary-exec-subr): Unset wl-message-buffer if diff --git a/wl/wl-summary.el b/wl/wl-summary.el index f67c873..bbeb61e 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -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 -- 1.7.10.4