X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fnnml.el;h=d2f985eeff8838a535e915b94b4f85392df15294;hb=d1a0a596d0dea53552b13d39262763dedc3380fe;hp=bc6a77ea80de710ef22195ac7fd594e172d7754a;hpb=b6a93585a31c8f392c69dabc5ff84248b93b8eac;p=elisp%2Fgnus.git- diff --git a/lisp/nnml.el b/lisp/nnml.el index bc6a77e..d2f985e 100644 --- a/lisp/nnml.el +++ b/lisp/nnml.el @@ -375,7 +375,7 @@ marks file will be regenerated properly by Gnus.") (nnmail-check-syntax) (let (result) (when nnmail-cache-accepted-message-ids - (nnmail-cache-insert (nnmail-fetch-field "message-id"))) + (nnmail-cache-insert (nnmail-fetch-field "message-id") group)) (if (stringp group) (and (nnmail-activate 'nnml) @@ -424,8 +424,7 @@ marks file will be regenerated properly by Gnus.") (if (or (looking-at art) (search-forward (concat "\n" art) nil t)) ;; Delete the old NOV line. - (delete-region (progn (beginning-of-line) (point)) - (progn (forward-line 1) (point))) + (gnus-delete-line) ;; The line isn't here, so we have to find out where ;; we should insert it. (This situation should never ;; occur, but one likes to make sure...) @@ -699,7 +698,7 @@ marks file will be regenerated properly by Gnus.") (nnheader-insert-nov headers))) (defsubst nnml-header-value () - (buffer-substring (match-end 0) (progn (end-of-line) (point)))) + (buffer-substring (match-end 0) (gnus-point-at-eol))) (defun nnml-parse-head (chars &optional number) "Parse the head of the current buffer." @@ -708,16 +707,10 @@ marks file will be regenerated properly by Gnus.") (unless (zerop (buffer-size)) (narrow-to-region (goto-char (point-min)) - (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))) + (if (re-search-forward "\n\r?\n" nil t) + (1- (point)) + (point-max)))) + (let ((headers (nnheader-parse-naked-head))) (mail-header-set-chars headers chars) (mail-header-set-number headers number) headers)))) @@ -747,8 +740,8 @@ marks file will be regenerated properly by Gnus.") (when (buffer-name (cdar nnml-nov-buffer-alist)) (set-buffer (cdar nnml-nov-buffer-alist)) (when (buffer-modified-p) - (nnmail-write-region 1 (point-max) nnml-nov-buffer-file-name - nil 'nomesg)) + (nnmail-write-region (point-min) (point-max) + nnml-nov-buffer-file-name nil 'nomesg)) (set-buffer-modified-p nil) (kill-buffer (current-buffer))) (setq nnml-nov-buffer-alist (cdr nnml-nov-buffer-alist))))) @@ -837,7 +830,7 @@ marks file will be regenerated properly by Gnus.") (progn (re-search-forward "\n\r?\n" nil t) (setq chars (- (point-max) (point))) - (max 1 (1- (point))))) + (max (point-min) (1- (point))))) (unless (zerop (buffer-size)) (goto-char (point-min)) (setq headers (nnml-parse-head chars (caar files))) @@ -849,7 +842,7 @@ marks file will be regenerated properly by Gnus.") (setq files (cdr files))) (save-excursion (set-buffer nov-buffer) - (nnmail-write-region 1 (point-max) nov nil 'nomesg) + (nnmail-write-region (point-min) (point-max) nov nil 'nomesg) (kill-buffer (current-buffer)))))) (defun nnml-nov-delete-article (group article)