Mercurial > emacs
changeset 69854:1b196049b994
(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.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 08 Apr 2006 08:14:48 +0000 |
parents | 7f959ed37cb6 |
children | 5e325cfb048b |
files | lisp/international/mule-cmds.el |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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