diff options
| author | Eli Zaretskii | 2006-04-08 08:15:34 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2006-04-08 08:15:34 +0000 |
| commit | cdb1af304e5b900c0f357b0010267c87f4c15fde (patch) | |
| tree | 4af698b12bd5ebb00b56fc8dae82ddec62b3b8e8 | |
| parent | b4f739947722ad1f58d96c0f0d83f075368fca98 (diff) | |
| download | emacs-cdb1af304e5b900c0f357b0010267c87f4c15fde.tar.gz emacs-cdb1af304e5b900c0f357b0010267c87f4c15fde.zip | |
(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.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/international/mule-cmds.el | 9 |
2 files changed, 15 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a44ace57e3f..47a76ae10d0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2006-04-08 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * international/mule-cmds.el (set-locale-environment): Make sure | ||
| 4 | the coding-system preferred by the locale's language has the same | ||
| 5 | EOL conversion type as the original buffer-file-coding-system. | ||
| 6 | |||
| 1 | 2006-04-07 Richard Stallman <rms@gnu.org> | 7 | 2006-04-07 Richard Stallman <rms@gnu.org> |
| 2 | 8 | ||
| 3 | * simple.el (eval-expression): Doc fix. | 9 | * 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', | |||
| 2496 | (locale-name-match locale locale-language-names)) | 2496 | (locale-name-match locale locale-language-names)) |
| 2497 | (charset-language-name | 2497 | (charset-language-name |
| 2498 | (locale-name-match locale locale-charset-language-names)) | 2498 | (locale-name-match locale locale-charset-language-names)) |
| 2499 | (default-eol-type (coding-system-eol-type | ||
| 2500 | default-buffer-file-coding-system)) | ||
| 2499 | (coding-system | 2501 | (coding-system |
| 2500 | (or (locale-name-match locale locale-preferred-coding-systems) | 2502 | (or (locale-name-match locale locale-preferred-coding-systems) |
| 2501 | (when locale | 2503 | (when locale |
| @@ -2516,6 +2518,13 @@ See also `locale-charset-language-names', `locale-language-names', | |||
| 2516 | (if (not language-name) | 2518 | (if (not language-name) |
| 2517 | (setq language-name charset-language-name))) | 2519 | (setq language-name charset-language-name))) |
| 2518 | 2520 | ||
| 2521 | ;; If a specific EOL conversion was specified in the default | ||
| 2522 | ;; buffer-file-coding-system, preserve it in the coding system | ||
| 2523 | ;; we will be using from now on. | ||
| 2524 | (if (memq default-eol-type '(0 1 2 unix dos mac)) | ||
| 2525 | (setq coding-system (coding-system-change-eol-conversion | ||
| 2526 | coding-system default-eol-type))) | ||
| 2527 | |||
| 2519 | (when language-name | 2528 | (when language-name |
| 2520 | 2529 | ||
| 2521 | ;; Set up for this character set. This is now the right way | 2530 | ;; Set up for this character set. This is now the right way |