comparison lisp/mail/rmail.el @ 102012:6ae248938872

(rmail-convert-file-maybe): Turn off case-fold-search. (rmail-add-mbox-headers): Likewise.
author Richard M. Stallman <rms@gnu.org>
date Sat, 14 Feb 2009 02:51:55 +0000
parents 12c790fb58af
children c7da4634b3a9
comparison
equal deleted inserted replaced
102011:1f674ca9661d 102012:6ae248938872
889 (defun rmail-convert-file-maybe () 889 (defun rmail-convert-file-maybe ()
890 "Determine if the file needs to be converted to mbox format." 890 "Determine if the file needs to be converted to mbox format."
891 (widen) 891 (widen)
892 (goto-char (point-min)) 892 (goto-char (point-min))
893 ;; Detect previous Babyl format files. 893 ;; Detect previous Babyl format files.
894 (cond ((looking-at "BABYL OPTIONS:") 894 (let ((case-fold-search nil))
895 ;; The file is Babyl version 5. Use unrmail to convert 895 (cond ((looking-at "BABYL OPTIONS:")
896 ;; it. 896 ;; The file is Babyl version 5. Use unrmail to convert
897 (rmail-convert-babyl-to-mbox)) 897 ;; it.
898 ((looking-at "Version: 5\n") 898 (rmail-convert-babyl-to-mbox))
899 ;; Losing babyl file made by old version of Rmail. Fix the 899 ((looking-at "Version: 5\n")
900 ;; babyl file header and use unrmail to convert to mbox 900 ;; Losing babyl file made by old version of Rmail. Fix the
901 ;; format. 901 ;; babyl file header and use unrmail to convert to mbox
902 (let ((buffer-read-only nil)) 902 ;; format.
903 (insert "BABYL OPTIONS: -*- rmail -*-\n") 903 (let ((buffer-read-only nil))
904 (rmail-convert-babyl-to-mbox))) 904 (insert "BABYL OPTIONS: -*- rmail -*-\n")
905 ((equal (point-min) (point-max)) 905 (rmail-convert-babyl-to-mbox)))
906 (message "Empty Rmail file.")) 906 ((equal (point-min) (point-max))
907 ((looking-at "From ")) 907 (message "Empty Rmail file."))
908 (t (error "Invalid mbox file")))) 908 ((looking-at "From "))
909 (t (error "Invalid mbox file")))))
909 910
910 (defun rmail-error-bad-format (&optional msgnum) 911 (defun rmail-error-bad-format (&optional msgnum)
911 "Report that the buffer is not in the mbox file format. 912 "Report that the buffer is not in the mbox file format.
912 MSGNUM, if present, indicates the malformed message." 913 MSGNUM, if present, indicates the malformed message."
913 (if msgnum 914 (if msgnum
1971 (save-excursion 1972 (save-excursion
1972 (save-restriction 1973 (save-restriction
1973 (let ((count 0) 1974 (let ((count 0)
1974 (start (point)) 1975 (start (point))
1975 (value "------U-") 1976 (value "------U-")
1977 (case-fold-search nil)
1976 limit) 1978 limit)
1977 ;; Detect an empty inbox file. 1979 ;; Detect an empty inbox file.
1978 (unless (= start (point-max)) 1980 (unless (= start (point-max))
1979 ;; Scan the new messages to establish a count and to ensure that 1981 ;; Scan the new messages to establish a count and to ensure that
1980 ;; an attribute header is present. 1982 ;; an attribute header is present.