2003-01-20 Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>
+ * 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.
(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"