diff options
| author | Kenichi Handa | 2005-07-07 06:20:13 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2005-07-07 06:20:13 +0000 |
| commit | 4a6cbbc4168e473cde0a3230afbbcc7612b56889 (patch) | |
| tree | 00f4cac4d8b1ec84618d410668eb220c46213f9a | |
| parent | a9be26751cc1af15035ff9c40aafc698f8c56f30 (diff) | |
| download | emacs-4a6cbbc4168e473cde0a3230afbbcc7612b56889.tar.gz emacs-4a6cbbc4168e473cde0a3230afbbcc7612b56889.zip | |
(set-default-coding-systems): Don't
set default-file-name-coding-system and
default-keyboard-coding-system if coding-system is
ASCII-incompatible.
| -rw-r--r-- | lisp/international/mule-cmds.el | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index bb69dbda155..d503eebe6d9 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el | |||
| @@ -321,9 +321,11 @@ This sets the following coding systems: | |||
| 321 | o coding system of a newly created buffer | 321 | o coding system of a newly created buffer |
| 322 | o default coding system for subprocess I/O | 322 | o default coding system for subprocess I/O |
| 323 | This also sets the following values: | 323 | This also sets the following values: |
| 324 | o default value used as `file-name-coding-system' for converting file names. | 324 | o default value used as `file-name-coding-system' for converting file names |
| 325 | if CODING-SYSTEM is ASCII-compatible. | ||
| 325 | o default value for the command `set-terminal-coding-system' (not on MSDOS) | 326 | o default value for the command `set-terminal-coding-system' (not on MSDOS) |
| 326 | o default value for the command `set-keyboard-coding-system'." | 327 | o default value for the command `set-keyboard-coding-system' |
| 328 | if CODING-SYSTEM is ASCII-compatible.." | ||
| 327 | (check-coding-system coding-system) | 329 | (check-coding-system coding-system) |
| 328 | (setq-default buffer-file-coding-system coding-system) | 330 | (setq-default buffer-file-coding-system coding-system) |
| 329 | (if (fboundp 'ucs-set-table-for-input) | 331 | (if (fboundp 'ucs-set-table-for-input) |
| @@ -331,14 +333,18 @@ This also sets the following values: | |||
| 331 | (or (local-variable-p 'buffer-file-coding-system buffer) | 333 | (or (local-variable-p 'buffer-file-coding-system buffer) |
| 332 | (ucs-set-table-for-input buffer)))) | 334 | (ucs-set-table-for-input buffer)))) |
| 333 | 335 | ||
| 334 | (if (and default-enable-multibyte-characters (not (eq system-type 'darwin))) | 336 | (if (and default-enable-multibyte-characters (not (eq system-type 'darwin)) |
| 337 | (or (not coding-system) | ||
| 338 | (not (coding-system-get coding-system 'ascii-incompatible)))) | ||
| 335 | ;; The file-name coding system on Darwin systems is always utf-8. | 339 | ;; The file-name coding system on Darwin systems is always utf-8. |
| 336 | (setq default-file-name-coding-system coding-system)) | 340 | (setq default-file-name-coding-system coding-system)) |
| 337 | ;; If coding-system is nil, honor that on MS-DOS as well, so | 341 | ;; If coding-system is nil, honor that on MS-DOS as well, so |
| 338 | ;; that they could reset the terminal coding system. | 342 | ;; that they could reset the terminal coding system. |
| 339 | (unless (and (eq window-system 'pc) coding-system) | 343 | (unless (and (eq window-system 'pc) coding-system) |
| 340 | (setq default-terminal-coding-system coding-system)) | 344 | (setq default-terminal-coding-system coding-system)) |
| 341 | (setq default-keyboard-coding-system coding-system) | 345 | (if (or (not coding-system) |
| 346 | (not (coding-system-get coding-system 'ascii-incompatible))) | ||
| 347 | (setq default-keyboard-coding-system coding-system)) | ||
| 342 | ;; Preserve eol-type from existing default-process-coding-systems. | 348 | ;; Preserve eol-type from existing default-process-coding-systems. |
| 343 | ;; On non-unix-like systems in particular, these may have been set | 349 | ;; On non-unix-like systems in particular, these may have been set |
| 344 | ;; carefully by the user, or by the startup code, to deal with the | 350 | ;; carefully by the user, or by the startup code, to deal with the |