]> git.eshelyaron.com Git - emacs.git/commitdiff
(rmail-redecode-body): Don't change EOL conversion of the new encoding if
authorEli Zaretskii <eliz@gnu.org>
Sat, 31 Jan 2009 10:10:02 +0000 (10:10 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 31 Jan 2009 10:10:02 +0000 (10:10 +0000)
the old one left it unspecified.

lisp/ChangeLog
lisp/mail/rmail.el

index f2ec713e3935ac7e2687c66beb9f5cd78c90080a..d85f7ab9225f3efa8efe210cf8471fb8811eb4be 100644 (file)
@@ -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>
 
index 6651b3fc236ef2dd346ee9449ce45e79b5fed97b..4453adbd143712d251bc3cee1e4cadbc85ebbcc5 100644 (file)
@@ -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.