From: yoichi Date: Mon, 20 Jan 2003 14:05:35 +0000 (+0000) Subject: * wl-mime.el (wl-message-delete-current-part): Avoid error on X-Git-Tag: merged-trunk-to-elmo-mark-14~12 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=c88afad335636e1bdf21217ad36f90e4e19e5df7;p=elisp%2Fwanderlust.git * wl-mime.el (wl-message-delete-current-part): Avoid error on message without msgid. Rewrite with elmo-folder-move-messages. Set wl-message-buffer to nil. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 950f830..98d49e6 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,10 @@ 2003-01-20 Yoichi NAKAYAMA + * wl-mime.el (wl-message-delete-current-part): Avoid error on + message without msgid. + Rewrite with elmo-folder-move-messages. + Set wl-message-buffer to nil. + * wl-summary.el (wl-summary-erase-subr): New function. Use elmo-folder-move-messages. (wl-summary-erase): Call it. diff --git a/wl/wl-mime.el b/wl/wl-mime.el index 4efa3d1..e057837 100644 --- a/wl/wl-mime.el +++ b/wl/wl-mime.el @@ -273,25 +273,26 @@ It calls following-method selected from variable (yes-or-no-p (format "Do you really want to delete part %s? " (wl-mime-node-id-to-string node-id)))) - (with-temp-buffer - (insert-buffer orig-buf) - (delete-region header-start body-end) - (goto-char header-start) - (insert "Content-Type: text/plain; charset=US-ASCII\n\n") - (insert "** This part has been removed by Wanderlust **\n\n") - (elmo-folder-append-buffer folder t)) - - (elmo-folder-append-messages - (wl-folder-get-elmo-folder wl-trash-folder) - folder (list number) nil) - (elmo-folder-delete-messages folder (list number)) - - (when (file-exists-p (elmo-cache-get-path msgid)) - (delete-file (elmo-cache-get-path msgid))) - - (mime-preview-quit) - (wl-summary-toggle-disp-msg 'off) - (wl-summary-sync nil "update"))))) + (when (with-temp-buffer + (insert-buffer orig-buf) + (delete-region header-start body-end) + (goto-char header-start) + (insert "Content-Type: text/plain; charset=US-ASCII\n\n") + (insert "** This part has been removed by Wanderlust **\n\n") + (elmo-folder-append-buffer folder t)) + + (elmo-folder-move-messages + folder (list number) + (wl-folder-get-elmo-folder wl-trash-folder)) + (when (and (elmo-cache-get-path msgid) + (file-exists-p (elmo-cache-get-path msgid))) + (delete-file (elmo-cache-get-path msgid))) + + (mime-preview-quit) + (wl-summary-delete-messages-on-buffer (list number)) + (wl-summary-toggle-disp-msg 'off) + (setq wl-message-buffer nil) + (wl-summary-sync nil "update")))))) (defun wl-message-decrypt-pgp-nonmime () "Decrypt PGP encrypted region"