]> git.eshelyaron.com Git - emacs.git/commitdiff
(set-locale-environment): Make sure the coding-system preferred by the
authorEli Zaretskii <eliz@gnu.org>
Sat, 8 Apr 2006 08:15:34 +0000 (08:15 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 8 Apr 2006 08:15:34 +0000 (08:15 +0000)
locale's language has the same EOL conversion type as the original
buffer-file-coding-system.

lisp/ChangeLog
lisp/international/mule-cmds.el

index a44ace57e3fc001012fc3bb452d11026d2d103f3..47a76ae10d061f1546c83090e13287664bd16429 100644 (file)
@@ -1,3 +1,9 @@
+2006-04-08  Eli Zaretskii  <eliz@gnu.org>
+
+       * international/mule-cmds.el (set-locale-environment): Make sure
+       the coding-system preferred by the locale's language has the same
+       EOL conversion type as the original buffer-file-coding-system.
+
 2006-04-07  Richard Stallman  <rms@gnu.org>
 
        * simple.el (eval-expression): Doc fix.
index 44b3d30e72968b0bb04f8fa8a92e0ba53e373149..7aebc4928abd129a6e4701cf10116d40f47bd217 100644 (file)
@@ -2496,6 +2496,8 @@ See also `locale-charset-language-names', `locale-language-names',
             (locale-name-match locale locale-language-names))
            (charset-language-name
             (locale-name-match locale locale-charset-language-names))
+           (default-eol-type (coding-system-eol-type
+                              default-buffer-file-coding-system))
            (coding-system
             (or (locale-name-match locale locale-preferred-coding-systems)
                 (when locale
@@ -2516,6 +2518,13 @@ See also `locale-charset-language-names', `locale-language-names',
          (if (not language-name)
              (setq language-name charset-language-name)))
 
+       ;; If a specific EOL conversion was specified in the default
+       ;; buffer-file-coding-system, preserve it in the coding system
+       ;; we will be using from now on.
+       (if (memq default-eol-type '(0 1 2 unix dos mac))
+           (setq coding-system (coding-system-change-eol-conversion
+                                coding-system default-eol-type)))
+
        (when language-name
 
          ;; Set up for this character set.  This is now the right way