Commit cdb1af30 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

(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.
parent b4f73994
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.
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment