diff options
author | Eli Zaretskii <eliz@gnu.org> | 2009-01-31 10:10:02 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2009-01-31 10:10:02 +0000 |
commit | 0300c3390ac6b44e039b45e9a51e5a1f318dd155 (patch) | |
tree | 58cbca4215fa887606b0fd697a0f7b715084240c /lisp | |
parent | aa8c69584f1dccdfff747a1d04c09febae30e183 (diff) | |
download | emacs-0300c3390ac6b44e039b45e9a51e5a1f318dd155.tar.gz |
(rmail-redecode-body): Don't change EOL conversion of the new encoding if
the old one left it unspecified.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 2 | ||||
-rw-r--r-- | lisp/mail/rmail.el | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f2ec713e393..d85f7ab9225 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -4,6 +4,8 @@ encoding to `raw-text-unix'. (rmail-perm-variables): Set encoding of rmail-view-buffer to `undecided-unix'. + (rmail-redecode-body): Don't change EOL conversion of the new + encoding if the old one left it unspecified. 2009-01-31 Glenn Morris <rgm@gnu.org> diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 6651b3fc236..4453adbd143 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -2687,9 +2687,10 @@ iso-8859, koi8-r, etc." ;; 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. |