Mercurial > emacs
comparison lisp/mail/rmail.el @ 73279:fb0e9cf9f77b
(rmail-redecode-body): If the old encoding is `undecided', call
find-coding-systems-region to find a proper non-trivial encoding.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 07 Oct 2006 13:12:42 +0000 |
parents | 7d4fe4b4afc9 |
children | f3db6404bec1 |
comparison
equal
deleted
inserted
replaced
73278:ccad7965cd2c | 73279:fb0e9cf9f77b |
---|---|
2873 ;; up all over the place. | 2873 ;; up all over the place. |
2874 (setq coding | 2874 (setq coding |
2875 (coding-system-change-eol-conversion | 2875 (coding-system-change-eol-conversion |
2876 coding | 2876 coding |
2877 (coding-system-eol-type old-coding))) | 2877 (coding-system-eol-type old-coding))) |
2878 ;; If old-coding is `undecided', encode-coding-region | |
2879 ;; will not encode the text at all. Find a proper | |
2880 ;; non-trivial encoding to use. | |
2881 (if (memq (coding-system-base old-coding) '(nil undecided)) | |
2882 (setq old-coding | |
2883 (car (find-coding-systems-region msgbeg msgend)))) | |
2878 (setq x-coding-header (point-marker)) | 2884 (setq x-coding-header (point-marker)) |
2879 (narrow-to-region msgbeg msgend) | 2885 (narrow-to-region msgbeg msgend) |
2880 (encode-coding-region (point) msgend old-coding) | 2886 (encode-coding-region (point) msgend old-coding) |
2881 (decode-coding-region (point) msgend coding) | 2887 (decode-coding-region (point) msgend coding) |
2882 (setq last-coding-system-used coding) | 2888 (setq last-coding-system-used coding) |