Mercurial > emacs
comparison lisp/gnus/nnheader.el @ 72203:eddf5f0ed3c9
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
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 31 Jul 2006 09:40:13 +0000 |
parents | 1077b8039c32 |
children | 4fa1b5c6a34c 858cb33ae39d |
comparison
equal
deleted
inserted
replaced
72202:423408615aaa | 72203:eddf5f0ed3c9 |
---|---|
584 "Insert the head of the article." | 584 "Insert the head of the article." |
585 (when (file-exists-p file) | 585 (when (file-exists-p file) |
586 (if (eq nnheader-max-head-length t) | 586 (if (eq nnheader-max-head-length t) |
587 ;; Just read the entire file. | 587 ;; Just read the entire file. |
588 (nnheader-insert-file-contents file) | 588 (nnheader-insert-file-contents file) |
589 ;; Read 1K blocks until we find a separator. | 589 ;; Read blocks of the size specified by `nnheader-head-chop-length' |
590 ;; until we find a separator. | |
590 (let ((beg 0) | 591 (let ((beg 0) |
591 format-alist) | 592 (start (point)) |
593 ;; Use `binary' to prevent the contents from being decoded, | |
594 ;; or it will change the number of characters that | |
595 ;; `insert-file-contents' returns. | |
596 (coding-system-for-read 'binary)) | |
592 (while (and (eq nnheader-head-chop-length | 597 (while (and (eq nnheader-head-chop-length |
593 (nth 1 (nnheader-insert-file-contents | 598 (nth 1 (mm-insert-file-contents |
594 file nil beg | 599 file nil beg |
595 (incf beg nnheader-head-chop-length)))) | 600 (incf beg nnheader-head-chop-length)))) |
596 (prog1 (not (search-forward "\n\n" nil t)) | 601 ;; CRLF of CR might be used for the line-break code. |
602 (prog1 (not (re-search-forward "\n\r?\n\\|\r\r" nil t)) | |
597 (goto-char (point-max))) | 603 (goto-char (point-max))) |
598 (or (null nnheader-max-head-length) | 604 (or (null nnheader-max-head-length) |
599 (< beg nnheader-max-head-length)))))) | 605 (< beg nnheader-max-head-length)))) |
606 ;; Finally decode the contents. | |
607 (when (mm-coding-system-p nnheader-file-coding-system) | |
608 (mm-decode-coding-region start (point-max) | |
609 nnheader-file-coding-system)))) | |
600 t)) | 610 t)) |
601 | 611 |
602 (defun nnheader-article-p () | 612 (defun nnheader-article-p () |
603 "Say whether the current buffer looks like an article." | 613 "Say whether the current buffer looks like an article." |
604 (goto-char (point-min)) | 614 (goto-char (point-min)) |