# HG changeset patch # User Eli Zaretskii # Date 1144484088 0 # Node ID 1b196049b9945e256c197ee4f50edb9765789c6a # Parent 7f959ed37cb651440106a321a62135460566cea8 (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. diff -r 7f959ed37cb6 -r 1b196049b994 lisp/international/mule-cmds.el --- a/lisp/international/mule-cmds.el Fri Apr 07 23:30:42 2006 +0000 +++ b/lisp/international/mule-cmds.el Sat Apr 08 08:14:48 2006 +0000 @@ -2496,6 +2496,8 @@ (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 @@ (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