From fbefe5cd8d62ccb154b90f0d31a522a49151d004 Mon Sep 17 00:00:00 2001 From: okazaki Date: Sat, 3 Apr 2004 10:15:11 +0000 Subject: [PATCH] * elmo-imap4.el (elmo-imap4-fetch-callback-1): Use `elmo-delete-cr-buffer'. * elmo-nntp.el (elmo-nntp-retrieve-headers): Ditto. * elmo-pop3.el (elmo-pop3-retrieve-headers): Ditto. --- elmo/elmo-imap4.el | 6 ++---- elmo/elmo-nntp.el | 6 ++---- elmo/elmo-pop3.el | 6 ++---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index c7a4ff9..3f694d4 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -879,10 +879,8 @@ If CHOP-LENGTH is not specified, message set is not chopped." (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")) + ;; Replace all CRLF with LF. + (elmo-delete-cr-buffer) (elmo-msgdb-create-message-entity-from-buffer handler (elmo-imap4-response-value element 'uid) diff --git a/elmo/elmo-nntp.el b/elmo/elmo-nntp.el index df6e816..9d0eb95 100644 --- a/elmo/elmo-nntp.el +++ b/elmo/elmo-nntp.el @@ -1379,10 +1379,8 @@ Returns a list of cons cells like (NUMBER . VALUE)" (elmo-display-progress 'elmo-nntp-retrieve-headers "Getting headers..." 100)) (message "Getting headers...done") - ;; Remove all "\r"'s. - (goto-char (point-min)) - (while (search-forward "\r\n" nil t) - (replace-match "\n")) + ;; Replace all CRLF with LF. + (elmo-delete-cr-buffer) (copy-to-buffer outbuf (point-min) (point-max))))) ;; end of from Gnus diff --git a/elmo/elmo-pop3.el b/elmo/elmo-pop3.el index adf01a6..afc7cbd 100644 --- a/elmo/elmo-pop3.el +++ b/elmo/elmo-pop3.el @@ -678,10 +678,8 @@ If IF-EXISTS is `any-exists', get BIFF session or normal session if exists." (accept-process-output process 1) ;;; (accept-process-output process) (discard-input)))) - ;; Remove all "\r"'s. - (goto-char (point-min)) - (while (search-forward "\r\n" nil t) - (replace-match "\n")) + ;; Replace all CRLF with LF. + (elmo-delete-cr-buffer) (copy-to-buffer tobuffer (point-min) (point-max))))) (luna-define-method elmo-folder-msgdb-create ((folder elmo-pop3-folder) -- 1.7.10.4