comparison lisp/mail/rmail.el @ 77699:1608babbc1ce

(rmail-convert-to-babyl-format): Check content-transfer-encoding _last_, because it's its position that we need in base64-header-field-end.
author Eli Zaretskii <eliz@gnu.org>
date Mon, 14 May 2007 19:48:30 +0000
parents 31c4e5bc7e74
children f87b929ffd17 d7172f202ab8
comparison
equal deleted inserted replaced
77698:18bb2e9c5f52 77699:1608babbc1ce
1957 "^content-transfer-encoding:\\(\n?[\t ]\\)*quoted-printable\\(\n?[\t ]\\)*" 1957 "^content-transfer-encoding:\\(\n?[\t ]\\)*quoted-printable\\(\n?[\t ]\\)*"
1958 header-end t))) 1958 header-end t)))
1959 (base64-header-field-end 1959 (base64-header-field-end
1960 (save-excursion 1960 (save-excursion
1961 (goto-char start) 1961 (goto-char start)
1962 ;; Don't try to decode non-text data.
1962 (and (re-search-forward 1963 (and (re-search-forward
1964 "^content-type:\\(\n?[\t ]\\)\\(text\\|message\\)/"
1965 header-end t)
1966 (goto-char start)
1967 (re-search-forward
1963 "^content-transfer-encoding:\\(\n?[\t ]\\)*base64\\(\n?[\t ]\\)*" 1968 "^content-transfer-encoding:\\(\n?[\t ]\\)*base64\\(\n?[\t ]\\)*"
1964 header-end t)
1965 ;; Don't try to decode non-text data.
1966 (re-search-forward
1967 "^content-type:\\(\n?[\t ]\\)\\(text\\|message\\)/"
1968 header-end t))))) 1969 header-end t)))))
1969 (if quoted-printable-header-field-end 1970 (if quoted-printable-header-field-end
1970 (save-excursion 1971 (save-excursion
1971 (unless 1972 (unless
1972 (mail-unquote-printable-region header-end (point) nil t t) 1973 (mail-unquote-printable-region header-end (point) nil t t)
2064 (re-search-forward 2065 (re-search-forward
2065 "^content-transfer-encoding:\\(\n?[\t ]\\)*quoted-printable\\(\n?[\t ]\\)*" 2066 "^content-transfer-encoding:\\(\n?[\t ]\\)*quoted-printable\\(\n?[\t ]\\)*"
2066 header-end t))) 2067 header-end t)))
2067 (base64-header-field-end 2068 (base64-header-field-end
2068 (and 2069 (and
2069 (save-excursion
2070 (re-search-forward
2071 "^content-transfer-encoding:\\(\n?[\t ]\\)*base64\\(\n?[\t ]\\)*"
2072 header-end t))
2073 ;; Don't decode non-text data. 2070 ;; Don't decode non-text data.
2074 (save-excursion 2071 (save-excursion
2075 (re-search-forward 2072 (re-search-forward
2076 "^content-type:\\(\n?[\t ]\\)\\(text\\|message\\)/" 2073 "^content-type:\\(\n?[\t ]\\)\\(text\\|message\\)/"
2074 header-end t))
2075 (save-excursion
2076 (re-search-forward
2077 "^content-transfer-encoding:\\(\n?[\t ]\\)*base64\\(\n?[\t ]\\)*"
2077 header-end t)))) 2078 header-end t))))
2078 (size 2079 (size
2079 ;; Get the numeric value from the Content-Length field. 2080 ;; Get the numeric value from the Content-Length field.
2080 (save-excursion 2081 (save-excursion
2081 ;; Back up to end of prev line, 2082 ;; Back up to end of prev line,