(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.
This commit is contained in:
Eli Zaretskii 2006-04-08 08:15:34 +00:00
parent b4f7399477
commit cdb1af304e
2 changed files with 15 additions and 0 deletions

View 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.

View 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