Mercurial > emacs
diff lisp/mail/rmail.el @ 90614:8dd8c8286063
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 460-475)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 145-152)
- Merge from emacs--devo--0
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-118
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sun, 15 Oct 2006 02:54:13 +0000 |
parents | a1a25ac6c88a f3db6404bec1 |
children | 02cf29720f31 |
line wrap: on
line diff
--- a/lisp/mail/rmail.el Thu Oct 05 12:20:23 2006 +0000 +++ b/lisp/mail/rmail.el Sun Oct 15 02:54:13 2006 +0000 @@ -623,7 +623,7 @@ ;;;###autoload (defvar rmail-mime-charset-pattern - (concat "^content-type:[ ]*text/plain;" + (concat "^content-type:[ \t]*text/plain;" "\\(?:[ \t\n]*\\(?:format\\|delsp\\)=\"?[-a-z0-9]+\"?;\\)*" "[ \t\n]*charset=\"?\\([^ \t\n\";]+\\)\"?") "Regexp to match MIME-charset specification in a header of message. @@ -2875,6 +2875,12 @@ (coding-system-change-eol-conversion coding (coding-system-eol-type old-coding))) + ;; If old-coding is `undecided', encode-coding-region + ;; will not encode the text at all. Find a proper + ;; non-trivial encoding to use. + (if (memq (coding-system-base old-coding) '(nil undecided)) + (setq old-coding + (car (find-coding-systems-region msgbeg msgend)))) (setq x-coding-header (point-marker)) (narrow-to-region msgbeg msgend) (encode-coding-region (point) msgend old-coding)