From f07d13f3d94d6708393b4e9af36695d52e37cf3e Mon Sep 17 00:00:00 2001 From: teranisi Date: Fri, 26 Sep 2003 15:46:44 +0000 Subject: [PATCH] * elmo-imap4.el (elmo-imap4-fetch-callback-1): Use elmo-imap4-current-msgdb to decide entity handler. --- elmo/ChangeLog | 5 +++++ elmo/elmo-imap4.el | 30 +++++++++++++++--------------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 17bda82..239edc2 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2003-09-26 Yuuichi Teranishi + + * elmo-imap4.el (elmo-imap4-fetch-callback-1): Use + elmo-imap4-current-msgdb to decide entity handler. + 2003-09-25 Yuuichi Teranishi * elmo-dop.el (elmo-dop-msgdb): Rewrite. diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index 47622a2..f8140ee 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -809,21 +809,21 @@ If CHOP-LENGTH is not specified, message set is not chopped." ;; Current buffer is process buffer. (defun elmo-imap4-fetch-callback-1 (element app-data) - (elmo-imap4-fetch-callback-1-subr - (with-temp-buffer - (insert (or (elmo-imap4-response-bodydetail-text element) - "")) - ;; Delete CR. - (goto-char (point-min)) - (while (search-forward "\r\n" nil t) - (replace-match "\n")) - (elmo-msgdb-create-message-entity-from-buffer - (elmo-msgdb-message-entity-handler - (elmo-folder-msgdb-internal (cdr app-data))) - (elmo-imap4-response-value element 'uid) - :size (elmo-imap4-response-value element 'rfc822size))) - (elmo-imap4-response-value element 'flags) - app-data)) + (let ((handler (elmo-msgdb-message-entity-handler elmo-imap4-current-msgdb))) + (elmo-imap4-fetch-callback-1-subr + (with-temp-buffer + (insert (or (elmo-imap4-response-bodydetail-text element) + "")) + ;; Delete CR. + (goto-char (point-min)) + (while (search-forward "\r\n" nil t) + (replace-match "\n")) + (elmo-msgdb-create-message-entity-from-buffer + handler + (elmo-imap4-response-value element 'uid) + :size (elmo-imap4-response-value element 'rfc822size))) + (elmo-imap4-response-value element 'flags) + app-data))) (defun elmo-imap4-parse-capability (string) (if (string-match "^\\*\\(.*\\)$" string) -- 1.7.10.4