Changeset 4140 for trunk/lisp/gnus/nnheader.el
- Timestamp:
- 2006年08月10日 11時19分54秒 (2 years ago)
- Files:
-
- trunk/lisp/gnus/nnheader.el (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lisp/gnus/nnheader.el
r4037 r4140 587 587 ;; Just read the entire file. 588 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 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 597 (while (and (eq nnheader-head-chop-length 593 (nth 1 ( nnheader-insert-file-contents598 (nth 1 (mm-insert-file-contents 594 599 file nil beg 595 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 603 (goto-char (point-max))) 598 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 610 t)) 601 611
