diff options
author | Miles Bader <miles@gnu.org> | 2006-07-31 09:40:13 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2006-07-31 09:40:13 +0000 |
commit | ebf693f35f0780516a57f50b2ae286b7cedc85ec (patch) | |
tree | fb1ab59bb928c9de5e7c7812e63973e09725fd2a /lisp/gnus/nnheader.el | |
parent | 988fd256ad902c9475feb34ac14b485576049f12 (diff) | |
download | emacs-ebf693f35f0780516a57f50b2ae286b7cedc85ec.tar.gz |
Merge from gnus--rel--5.10
Patches applied:
* gnus--rel--5.10 (patch 121-122)
- Update from CVS
2006-07-28 Reiner Steib <Reiner.Steib@gmx.de>
* etc/GNUS-NEWS: Regenerate from Oort Gnus node in texi/gnus.texi using
texi/gnus-news.el of the trunk.
2006-07-28 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/nnheader.el (nnheader-insert-head): Make it work with Mac as well.
2006-07-27 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/nnheader.el (nnheader-insert-head): Make it work even if the file
uses CRLF for the line-break code.
2006-07-28 Katsumi Yamaoka <yamaoka@jpl.org>
* man/gnus.texi (Oort Gnus): Mention that the Lisp files are now installed
in .../site-lisp/gnus/ by default.
[ From gnus-news.texi in the trunk. ]
2006-07-27 Reiner Steib <Reiner.Steib@gmx.de>
* man/gnus.texi (MIME Commands): Additions for yEnc.
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-375
Diffstat (limited to 'lisp/gnus/nnheader.el')
-rw-r--r-- | lisp/gnus/nnheader.el | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el index d564d42414e..79732cd3d88 100644 --- a/lisp/gnus/nnheader.el +++ b/lisp/gnus/nnheader.el @@ -586,17 +586,27 @@ the line could be found." (if (eq nnheader-max-head-length t) ;; Just read the entire file. (nnheader-insert-file-contents file) - ;; Read 1K blocks until we find a separator. + ;; Read blocks of the size specified by `nnheader-head-chop-length' + ;; until we find a separator. (let ((beg 0) - format-alist) + (start (point)) + ;; Use `binary' to prevent the contents from being decoded, + ;; or it will change the number of characters that + ;; `insert-file-contents' returns. + (coding-system-for-read 'binary)) (while (and (eq nnheader-head-chop-length - (nth 1 (nnheader-insert-file-contents + (nth 1 (mm-insert-file-contents file nil beg (incf beg nnheader-head-chop-length)))) - (prog1 (not (search-forward "\n\n" nil t)) + ;; CRLF of CR might be used for the line-break code. + (prog1 (not (re-search-forward "\n\r?\n\\|\r\r" nil t)) (goto-char (point-max))) (or (null nnheader-max-head-length) - (< beg nnheader-max-head-length)))))) + (< beg nnheader-max-head-length)))) + ;; Finally decode the contents. + (when (mm-coding-system-p nnheader-file-coding-system) + (mm-decode-coding-region start (point-max) + nnheader-file-coding-system)))) t)) (defun nnheader-article-p () |