From: Simon Josefsson Date: Sat, 15 Sep 2001 21:18:37 +0000 (+0000) Subject: 2001-09-15 Simon Josefsson X-Git-Url: http://cgit.sxemacs.org/?p=gnus;a=commitdiff_plain;h=a180b48af6f4ab4a8aae17aa2a8945bb764b12e6 2001-09-15 Simon Josefsson * nnml.el (nnml-parse-head): Handle CRLF files. (nnml-generate-nov-file): Ditto. (nnml-retrieve-headers): Ditto. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5adb5701b..c846ff4bc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2001-09-15 Simon Josefsson + + * nnml.el (nnml-parse-head): Handle CRLF files. + (nnml-generate-nov-file): Ditto. + (nnml-retrieve-headers): Ditto. + 2001-09-15 Michael Welsh Duggan * gnus-spec.el (gnus-parse-format): Don't treat %c as %C. diff --git a/lisp/nnml.el b/lisp/nnml.el index 28230a964..408c6e523 100644 --- a/lisp/nnml.el +++ b/lisp/nnml.el @@ -157,7 +157,7 @@ This variable is a virtual server slot. See the Gnus manual for details.") (setq beg (point)) (nnheader-insert-head file) (goto-char beg) - (if (search-forward "\n\n" nil t) + (if (re-search-forward "\n\r?\n" nil t) (forward-char -1) (goto-char (point-max)) (insert "\n\n")) @@ -713,13 +713,15 @@ This variable is a virtual server slot. See the Gnus manual for details.") (unless (zerop (buffer-size)) (narrow-to-region (goto-char (point-min)) - (if (search-forward "\n\n" nil t) (1- (point)) (point-max)))) + (if (re-search-forward "\n\r?\n" nil t) (1- (point)) (point-max)))) ;; Fold continuation lines. (goto-char (point-min)) (while (re-search-forward "\\(\r?\n[ \t]+\\)+" nil t) (replace-match " " t t)) ;; Remove any tabs; they are too confusing. (subst-char-in-region (point-min) (point-max) ?\t ? ) + ;; Remove any ^M's; they are too confusing. + (subst-char-in-region (point-min) (point-max) ?\r ? ) (let ((headers (nnheader-parse-head t))) (mail-header-set-chars headers chars) (mail-header-set-number headers number) @@ -838,7 +840,7 @@ This variable is a virtual server slot. See the Gnus manual for details.") (narrow-to-region (goto-char (point-min)) (progn - (search-forward "\n\n" nil t) + (re-search-forward "\n\r?\n" nil t) (setq chars (- (point-max) (point))) (max 1 (1- (point))))) (unless (zerop (buffer-size)) @@ -973,7 +975,7 @@ Use the nov database for the current group if available." (if (null (gnus-gethash file nnml-marks-modtime)) t ;; never looked at marks file, assume it has changed (not (eq (gnus-gethash file nnml-marks-modtime) - (nth 5 (file-attributes file))))))) + (nth 5 (file-attributes file))))))) (defun nnml-save-marks (group server) (let ((file-name-coding-system nnmail-pathname-coding-system)