Show
Ignore:
Timestamp:
2006年08月10日 11時19分54秒 (2 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/gnus/nnheader.el

    r4037 r4140  
    587587        ;; Just read the entire file. 
    588588        (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. 
    590591      (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)) 
    592597        (while (and (eq nnheader-head-chop-length 
    593                         (nth 1 (nnheader-insert-file-contents 
     598                        (nth 1 (mm-insert-file-contents 
    594599                                file nil beg 
    595600                                (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)) 
    597603                      (goto-char (point-max))) 
    598604                    (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)))) 
    600610    t)) 
    601611