From cdb1af304e5b900c0f357b0010267c87f4c15fde Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 8 Apr 2006 08:15:34 +0000 Subject: [PATCH] (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. --- lisp/ChangeLog | 6 ++++++ lisp/international/mule-cmds.el | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a44ace57e3f..47a76ae10d0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2006-04-08 Eli Zaretskii + + * 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 * simple.el (eval-expression): Doc fix. diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 44b3d30e729..7aebc4928ab 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -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 -- 2.39.2