diff options
| author | Richard M. Stallman | 1997-08-05 07:05:12 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-08-05 07:05:12 +0000 |
| commit | 358d28fb0bf89c327dc9870b6894521737fcacd4 (patch) | |
| tree | fee4c2c6b019732b381515c23afda9e9a89a7f32 | |
| parent | a8fb994089c2a9481ed1ad09542ddab3f9257f0c (diff) | |
| download | emacs-358d28fb0bf89c327dc9870b6894521737fcacd4.tar.gz emacs-358d28fb0bf89c327dc9870b6894521737fcacd4.zip | |
Doc fixes.
(default-terminal-coding-system): New var.
(set-terminal-coding-system):
Use default-terminal-coding-system as default.
(default-keyboard-coding-system): New variable.
(set-keyboard-coding-system):
Use default-keyboard-coding-system as default.
| -rw-r--r-- | lisp/international/mule.el | 76 |
1 files changed, 58 insertions, 18 deletions
diff --git a/lisp/international/mule.el b/lisp/international/mule.el index ab2af2cfe1f..2e5fb312014 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el | |||
| @@ -467,8 +467,7 @@ FLAGS specifies more precise information of each TYPE. | |||
| 467 | 0))) | 467 | 0))) |
| 468 | 468 | ||
| 469 | (defun define-coding-system-alias (alias coding-system) | 469 | (defun define-coding-system-alias (alias coding-system) |
| 470 | "Define ALIAS as an alias for coding system | 470 | "Define ALIAS as an alias for coding system CODING-SYSTEM." |
| 471 | CODING-SYSTEM." | ||
| 472 | (check-coding-system coding-system) | 471 | (check-coding-system coding-system) |
| 473 | (let ((parent (coding-system-parent coding-system))) | 472 | (let ((parent (coding-system-parent coding-system))) |
| 474 | (if parent | 473 | (if parent |
| @@ -491,12 +490,16 @@ FLAGS specifies more precise information of each TYPE. | |||
| 491 | (setq i (1+ i))))))) | 490 | (setq i (1+ i))))))) |
| 492 | 491 | ||
| 493 | (defun set-buffer-file-coding-system (coding-system &optional force) | 492 | (defun set-buffer-file-coding-system (coding-system &optional force) |
| 494 | "Set buffer-file-coding-system of the current buffer to CODING-SYSTEM. | 493 | "Set the file coding-system of the current buffer to CODING-SYSTEM. |
| 495 | If eol-type of the current buffer-file-coding-system is an integer value N, and | 494 | This means that when you save the buffer, it will be converted |
| 496 | eol-type of CODING-SYSTEM is a vector, the Nth element of the vector is used | 495 | according to CODING-SYSTEM. For a list of possible values of CODING-SYSTEM, |
| 497 | instead of CODING-SYSTEM itself. | 496 | use \\[list-coding-systems]. |
| 498 | Optional prefix argument FORCE non-nil means CODING-SYSTEM is set | 497 | |
| 499 | regardless of eol-type of the current buffer-file-coding-system." | 498 | If the buffer's previous file coding-system value specifies end-of-line |
| 499 | conversion, and CODING-SYSTEM does not specify one, CODING-SYSTEM is | ||
| 500 | merged with the already-specified end-of-line conversion. | ||
| 501 | However, if the optional prefix argument FORCE is non-nil, | ||
| 502 | them CODING-SYSTEM is used exactly as specified." | ||
| 500 | (interactive "zBuffer-file-coding-system: \nP") | 503 | (interactive "zBuffer-file-coding-system: \nP") |
| 501 | (check-coding-system coding-system) | 504 | (check-coding-system coding-system) |
| 502 | (if (null force) | 505 | (if (null force) |
| @@ -508,27 +511,64 @@ Optional prefix argument FORCE non-nil means CODING-SYSTEM is set | |||
| 508 | (set-buffer-modified-p t) | 511 | (set-buffer-modified-p t) |
| 509 | (force-mode-line-update)) | 512 | (force-mode-line-update)) |
| 510 | 513 | ||
| 514 | (defvar default-terminal-coding-system nil | ||
| 515 | "Default value for the terminal coding system. | ||
| 516 | This is normally set according to the selected language environment. | ||
| 517 | See also the command `set-terminal-coding-system'.") | ||
| 518 | |||
| 511 | (defun set-terminal-coding-system (coding-system) | 519 | (defun set-terminal-coding-system (coding-system) |
| 512 | "Set coding system of your terminal to CODING-SYSTEM. | 520 | "Set coding system of your terminal to CODING-SYSTEM. |
| 513 | All outputs to terminal are encoded by the specified coding system." | 521 | All text output to the terminal will be encoded |
| 514 | (interactive "zCoding-system for terminal display: ") | 522 | with the specified coding system. |
| 523 | For a list of possible values of CODING-SYSTEM, use \\[list-coding-systems]. | ||
| 524 | The default is determined by the selected language environment | ||
| 525 | or by the previous use of this command." | ||
| 526 | (interactive | ||
| 527 | (list (read-coding-system | ||
| 528 | (format "Coding system for terminal display (default, %s): " | ||
| 529 | (if (and (not (terminal-coding-system)) | ||
| 530 | default-terminal-coding-system) | ||
| 531 | default-terminal-coding-system))))) | ||
| 532 | (if (and (not coding-system) | ||
| 533 | (not (terminal-coding-system))) | ||
| 534 | (setq coding-system default-terminal-coding-system)) | ||
| 535 | (if coding-system | ||
| 536 | (setq default-terminal-coding-system coding-system)) | ||
| 515 | (set-terminal-coding-system-internal coding-system) | 537 | (set-terminal-coding-system-internal coding-system) |
| 516 | (redraw-frame (selected-frame))) | 538 | (redraw-frame (selected-frame))) |
| 517 | 539 | ||
| 540 | (defvar default-keyboard-coding-system nil | ||
| 541 | "Default value of the keyboard coding system. | ||
| 542 | This is normally set according to the selected language environment. | ||
| 543 | See also the command `set-keyboard-coding-system'.") | ||
| 544 | |||
| 518 | (defun set-keyboard-coding-system (coding-system) | 545 | (defun set-keyboard-coding-system (coding-system) |
| 519 | "Set coding system of codes sent from terminal keyboard to CODING-SYSTEM. | 546 | "Set coding system for keyboard input to CODING-SYSTEM. |
| 520 | In addition, this command toggles Encoded-kbd minor mode. | 547 | In addition, this command enables Encoded-kbd minor mode. |
| 521 | If the specified coding system is nil, Encoded-bkd mode is turned off, | 548 | \(If CODING-SYSTEM is nil, Encoded-bkd mode is turned off.) |
| 522 | else it is turned on so that user inputs are decoded by the | 549 | For a list of possible values of CODING-SYSTEM, use \\[list-coding-systems]. |
| 523 | specified coding system." | 550 | The default is determined by the selected language environment |
| 524 | (interactive "zCoding-system for keyboard input: ") | 551 | or by the previous use of this command." |
| 552 | (interactive | ||
| 553 | (list (read-coding-system | ||
| 554 | (format "Coding system for keyboard input (default, %s): " | ||
| 555 | (if (and (not (keyboard-coding-system)) | ||
| 556 | default-keyboard-coding-system) | ||
| 557 | default-keyboard-coding-system))))) | ||
| 558 | (if (and (not coding-system) | ||
| 559 | (not (keyboard-coding-system))) | ||
| 560 | (setq coding-system default-keyboard-coding-system)) | ||
| 561 | (if coding-system | ||
| 562 | (setq default-keyboard-coding-system coding-system)) | ||
| 525 | (set-keyboard-coding-system-internal coding-system) | 563 | (set-keyboard-coding-system-internal coding-system) |
| 526 | (encoded-kbd-mode (if coding-system 1 0))) | 564 | (encoded-kbd-mode (if coding-system 1 0))) |
| 527 | 565 | ||
| 528 | (defun set-buffer-process-coding-system (decoding encoding) | 566 | (defun set-buffer-process-coding-system (decoding encoding) |
| 529 | "Set coding systems to the process associated with the current buffer. | 567 | "Set coding systems for the process associated with the current buffer. |
| 530 | DECODING is the coding system to be used to decode input from the process, | 568 | DECODING is the coding system to be used to decode input from the process, |
| 531 | ENCODING is to be used to encode output to the process." | 569 | ENCODING is the coding system to be used to encode output to the process. |
| 570 | |||
| 571 | For a list of possible values of CODING-SYSTEM, use \\[list-coding-systems]." | ||
| 532 | (interactive | 572 | (interactive |
| 533 | "zCoding-system for process input: \nzCoding-system for process output: ") | 573 | "zCoding-system for process input: \nzCoding-system for process output: ") |
| 534 | (let ((proc (get-buffer-process (current-buffer)))) | 574 | (let ((proc (get-buffer-process (current-buffer)))) |