* wl-summary.el (wl-summary-target-mark-erase): New function.
authoryoichi <yoichi>
Sun, 10 Nov 2002 12:07:39 +0000 (12:07 +0000)
committeryoichi <yoichi>
Sun, 10 Nov 2002 12:07:39 +0000 (12:07 +0000)
Bind it to "mD".

wl/ChangeLog
wl/wl-summary.el

index decbcfc..8d52d42 100644 (file)
@@ -1,3 +1,8 @@
+2002-11-10  Yoichi NAKAYAMA  <yoichi@eken.phys.nagoya-u.ac.jp>
+
+       * wl-summary.el (wl-summary-target-mark-erase): New function.
+       Bind it to "mD".
+
 2002-11-09  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * wl-vars.el (wl-draft-write-file-function): Fix.
index cb0fe71..a69659e 100644 (file)
@@ -511,6 +511,7 @@ See also variable `wl-use-petname'."
   (define-key wl-summary-mode-map "m?"   'wl-summary-target-mark-pick)
   (define-key wl-summary-mode-map "m#"   'wl-summary-target-mark-print)
   (define-key wl-summary-mode-map "m|"   'wl-summary-target-mark-pipe)
+  (define-key wl-summary-mode-map "mD"   'wl-summary-target-mark-erase)
 
   ;; region commands
   (define-key wl-summary-mode-map "r"    (make-sparse-keymap))
@@ -3156,6 +3157,21 @@ If optional argument NUMBER is specified, mark message specified by NUMBER."
              (save-excursion (wl-summary-sync nil "update"))))))
     (message "Read-only folder.")))
 
+(defun wl-summary-target-mark-erase ()
+  (interactive)
+  (if (elmo-folder-writable-p wl-summary-buffer-elmo-folder)
+      (if (null wl-summary-buffer-target-mark-list)
+         (message "No marked message.")
+       (when (yes-or-no-p
+              "Erase all marked messages without moving them to trash? ")
+         (while (car wl-summary-buffer-target-mark-list)
+           (let ((num (car wl-summary-buffer-target-mark-list)))
+             (wl-summary-unmark num)
+             (elmo-folder-delete-messages wl-summary-buffer-elmo-folder
+                                          (list num))))
+         (save-excursion (wl-summary-sync nil "update"))))
+    (message "Read-only folder.")))
+
 (defun wl-summary-read-folder (default &optional purpose ignore-error
                                no-create init)
   (let ((fld (completing-read