From: yoichi Date: Fri, 8 Nov 2002 08:09:59 +0000 (+0000) Subject: * wl-summary.el (wl-summary-erase): New function to erase message X-Git-Tag: wl-2_11_1~60 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=852c268cfbb69e575678fca133c7e0cbe5fa1360;p=elisp%2Fwanderlust.git * wl-summary.el (wl-summary-erase): New function to erase message without moving it to trash. Bind to "D". --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 051c7ce..7064551 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,8 @@ 2002-11-08 Yoichi NAKAYAMA + * wl-summary.el (wl-summary-erase): New function to erase message + without moving it to trash. Bind to "D". + * wl-draft.el (wl-user-agent-compose): Set wl-draft-buffer-style as `keep' unless switch-function. diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 04322a2..ce86452 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -406,7 +406,6 @@ See also variable `wl-use-petname'." (define-key wl-summary-mode-map "g" 'wl-summary-goto-folder) (define-key wl-summary-mode-map "G" 'wl-summary-goto-folder-sticky) (define-key wl-summary-mode-map "c" 'wl-summary-mark-as-read-all) -; (define-key wl-summary-mode-map "D" 'wl-summary-drop-unsync) (define-key wl-summary-mode-map "a" 'wl-summary-reply) (define-key wl-summary-mode-map "A" 'wl-summary-reply-with-citation) @@ -476,6 +475,7 @@ See also variable `wl-use-petname'." (define-key wl-summary-mode-map "d" 'wl-summary-delete) (define-key wl-summary-mode-map "u" 'wl-summary-unmark) (define-key wl-summary-mode-map "U" 'wl-summary-unmark-all) + (define-key wl-summary-mode-map "D" 'wl-summary-erase) ;; thread commands (define-key wl-summary-mode-map "t" (make-sparse-keymap)) @@ -3133,6 +3133,29 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." "") ".")))))) +(defun wl-summary-erase (&optional number) + "Erase message actually, without moving it to trash." + (interactive) + (if (elmo-folder-writable-p wl-summary-buffer-elmo-folder) + (let* ((buffer-num (wl-summary-message-number)) + (msg-num (or number buffer-num))) + (if (null msg-num) + (message "No message.") + (let* ((msgdb (wl-summary-buffer-msgdb)) + (entity (elmo-msgdb-overview-get-entity msg-num msgdb)) + (subject (elmo-delete-char + ?\n (or (elmo-msgdb-overview-entity-get-subject + entity) + wl-summary-no-subject-message)))) + (when (yes-or-no-p + (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-sync nil "update"))))) + (message "Read-only folder."))) + (defun wl-summary-read-folder (default &optional purpose ignore-error no-create init) (let ((fld (completing-read