Mercurial > emacs
changeset 101707:4bb10611bac4
(rmail-redecode-body): Don't change EOL conversion of the new encoding if
the old one left it unspecified.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 31 Jan 2009 10:08:37 +0000 |
parents | d77415a2f332 |
children | 823851e4047e |
files | lisp/mail/rmail.el |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/mail/rmail.el Sat Jan 31 09:32:45 2009 +0000 +++ b/lisp/mail/rmail.el Sat Jan 31 10:08:37 2009 +0000 @@ -2687,9 +2687,10 @@ ;; Make sure the new coding system uses the same EOL ;; conversion, to prevent ^M characters from popping up ;; all over the place. - (setq coding - (coding-system-change-eol-conversion - coding (coding-system-eol-type old-coding))) + (let ((eol-type (coding-system-eol-type old-coding))) + (if (numberp eol-type) + (setq coding + (coding-system-change-eol-conversion coding eol-type)))) ;; If old-coding is `undecided', encode-coding-region ;; will not encode the text at all. Find a proper ;; non-trivial encoding to use.