# HG changeset patch # User Eli Zaretskii # Date 1179172725 0 # Node ID 898efffc00dfc66fddc15e1b40e0c0be7b02c050 # Parent 4e046b2396efa9afd4f2753e7bf391d383535423 (rmail-convert-to-babyl-format): Check content-transfer-encoding _last_, because it's its position that we need as value of base64-header-field-end. diff -r 4e046b2396ef -r 898efffc00df lisp/mail/rmail.el --- a/lisp/mail/rmail.el Mon May 14 14:53:15 2007 +0000 +++ b/lisp/mail/rmail.el Mon May 14 19:58:45 2007 +0000 @@ -1959,12 +1959,13 @@ (base64-header-field-end (save-excursion (goto-char start) + ;; Don't try to decode non-text data. (and (re-search-forward - "^content-transfer-encoding:\\(\n?[\t ]\\)*base64\\(\n?[\t ]\\)*" + "^content-type:\\(\n?[\t ]\\)\\(text\\|message\\)/" header-end t) - ;; Don't try to decode non-text data. + (goto-char start) (re-search-forward - "^content-type:\\(\n?[\t ]\\)\\(text\\|message\\)/" + "^content-transfer-encoding:\\(\n?[\t ]\\)*base64\\(\n?[\t ]\\)*" header-end t))))) (if quoted-printable-header-field-end (save-excursion @@ -2066,14 +2067,14 @@ header-end t))) (base64-header-field-end (and - (save-excursion - (re-search-forward - "^content-transfer-encoding:\\(\n?[\t ]\\)*base64\\(\n?[\t ]\\)*" - header-end t)) ;; Don't decode non-text data. (save-excursion (re-search-forward "^content-type:\\(\n?[\t ]\\)\\(text\\|message\\)/" + header-end t)) + (save-excursion + (re-search-forward + "^content-transfer-encoding:\\(\n?[\t ]\\)*base64\\(\n?[\t ]\\)*" header-end t)))) (size ;; Get the numeric value from the Content-Length field.