diff options
| author | Dave Love | 2002-05-17 16:51:14 +0000 |
|---|---|---|
| committer | Dave Love | 2002-05-17 16:51:14 +0000 |
| commit | 07513d644b4a4a69f5b4ad96b753d54dcd181205 (patch) | |
| tree | 8e9ac6eb875177e7a1f36ab8282b6fba3275d358 | |
| parent | 981c8cc2e4cfa31bdfe7366c58c8e7f97aab1765 (diff) | |
| download | emacs-07513d644b4a4a69f5b4ad96b753d54dcd181205.tar.gz emacs-07513d644b4a4a69f5b4ad96b753d54dcd181205.zip | |
Doc fixes.
(charset-list, generic-char-p, set-coding-priority): Make
obsolete.
(coding-system-get): Try to convert old-style symbol to keyword.
| -rw-r--r-- | lisp/international/mule.el | 56 |
1 files changed, 33 insertions, 23 deletions
diff --git a/lisp/international/mule.el b/lisp/international/mule.el index f8cca270128..8a4d66c58ef 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; mule.el --- basic commands for mulitilingual environment | 1 | ;;; mule.el --- basic commands for multilingual environment |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. | 3 | ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. |
| 4 | ;; Licensed to the Free Software Foundation. | 4 | ;; Licensed to the Free Software Foundation. |
| @@ -48,7 +48,7 @@ Distribution date of this version of MULE (multilingual environment).") | |||
| 48 | (defun define-charset (name docstring &rest props) | 48 | (defun define-charset (name docstring &rest props) |
| 49 | "Define NAME (symbol) as a charset with DOCSTRING. | 49 | "Define NAME (symbol) as a charset with DOCSTRING. |
| 50 | The remaining arguments must come in pairs ATTRIBUTE VALUE. ATTRIBUTE | 50 | The remaining arguments must come in pairs ATTRIBUTE VALUE. ATTRIBUTE |
| 51 | may be any symbol. The followings have special meanings, and one of | 51 | may be any symbol. The following have special meanings, and one of |
| 52 | `:code-offset', `:map', `:parents' must be specified. | 52 | `:code-offset', `:map', `:parents' must be specified. |
| 53 | 53 | ||
| 54 | `:short-name' | 54 | `:short-name' |
| @@ -59,20 +59,20 @@ NAME is used. | |||
| 59 | `:long-name' | 59 | `:long-name' |
| 60 | 60 | ||
| 61 | VALUE must be a string longer than `:short-name' to identify the | 61 | VALUE must be a string longer than `:short-name' to identify the |
| 62 | charset. If omitted, the value of `:short-name' attribute is used. | 62 | charset. If omitted, the value of the `:short-name' attribute is used. |
| 63 | 63 | ||
| 64 | `:dimension' | 64 | `:dimension' |
| 65 | 65 | ||
| 66 | VALUE must be an integer 0, 1, 2, or 3, specifying the dimension of | 66 | VALUE must be an integer 0, 1, 2, or 3, specifying the dimension of |
| 67 | code-points of the charsets. If omitted, it is calculated from a | 67 | code-points of the charsets. If omitted, it is calculated from the |
| 68 | value of `:code-space' attribute. | 68 | value of the `:code-space' attribute. |
| 69 | 69 | ||
| 70 | `:code-space' | 70 | `:code-space' |
| 71 | 71 | ||
| 72 | VALUE must be a vector of length at most 8 specifying the byte code | 72 | VALUE must be a vector of length at most 8 specifying the byte code |
| 73 | range of each dimension in this format: | 73 | range of each dimension in this format: |
| 74 | [ MIN-1 MAX-1 MIN-2 MAX-2 ... ] | 74 | [ MIN-1 MAX-1 MIN-2 MAX-2 ... ] |
| 75 | where, MIN-N is the minimum byte value of Nth dimension of code-point, | 75 | where MIN-N is the minimum byte value of Nth dimension of code-point, |
| 76 | MAX-N is the maximum byte value of that. | 76 | MAX-N is the maximum byte value of that. |
| 77 | 77 | ||
| 78 | `:iso-final-char' | 78 | `:iso-final-char' |
| @@ -94,14 +94,14 @@ can't be encoded by coding-systems of type `emacs-mule'. | |||
| 94 | 94 | ||
| 95 | `:ascii-compatible-p' | 95 | `:ascii-compatible-p' |
| 96 | 96 | ||
| 97 | VALUE must be nil or t. If the VALUE is nil, the charset is a not | 97 | VALUE must be nil or t (default nil). If VALUE is t, the charset is |
| 98 | compatible with ASCII. The default value is nil. | 98 | compatible with ASCII, i.e. the first 128 code points map to ASCII. |
| 99 | 99 | ||
| 100 | `:supplementary-p' | 100 | `:supplementary-p' |
| 101 | 101 | ||
| 102 | VALUE must be nil or t. If the VALUE is t, the charset is | 102 | VALUE must be nil or t. If the VALUE is t, the charset is |
| 103 | supplementary, which means the charset is used only as a parent of | 103 | supplementary, which means it is used only as a parent of some other |
| 104 | some other charset. | 104 | charset. |
| 105 | 105 | ||
| 106 | `:invalid-code' | 106 | `:invalid-code' |
| 107 | 107 | ||
| @@ -112,8 +112,8 @@ should not be omitted. | |||
| 112 | 112 | ||
| 113 | `:code-offset' | 113 | `:code-offset' |
| 114 | 114 | ||
| 115 | VALUE must be an integer added to an index number of character to get | 115 | VALUE must be an integer added to the index number of a character to |
| 116 | the corresponding character code. | 116 | get the corresponding character code. |
| 117 | 117 | ||
| 118 | `:map' | 118 | `:map' |
| 119 | 119 | ||
| @@ -121,7 +121,7 @@ VALUE must be vector or string. | |||
| 121 | 121 | ||
| 122 | If it is a vector, the format is [ CODE-1 CHAR-1 CODE-2 CHAR-2 ... ], | 122 | If it is a vector, the format is [ CODE-1 CHAR-1 CODE-2 CHAR-2 ... ], |
| 123 | where CODE-n is a code-point of the charset, and CHAR-n is the | 123 | where CODE-n is a code-point of the charset, and CHAR-n is the |
| 124 | corresponding charcter code. | 124 | corresponding character code. |
| 125 | 125 | ||
| 126 | If it is a string, it is a name of file that contains the above | 126 | If it is a string, it is a name of file that contains the above |
| 127 | information. Each line of the file must be this format: | 127 | information. Each line of the file must be this format: |
| @@ -144,7 +144,7 @@ VALUE must be vector or string. | |||
| 144 | 144 | ||
| 145 | If it is a vector, the format is [ CODE-1 CHAR-1 CODE-2 CHAR-2 ... ], | 145 | If it is a vector, the format is [ CODE-1 CHAR-1 CODE-2 CHAR-2 ... ], |
| 146 | where CODE-n is a code-point of the charset, and CHAR-n is the | 146 | where CODE-n is a code-point of the charset, and CHAR-n is the |
| 147 | corresponding Unicode charcter code. | 147 | corresponding Unicode character code. |
| 148 | 148 | ||
| 149 | If it is a string, it is a name of file that contains the above | 149 | If it is a string, it is a name of file that contains the above |
| 150 | information. The file format is the same as what described for `:map' | 150 | information. The file format is the same as what described for `:map' |
| @@ -311,10 +311,12 @@ It can be retrieved with `(get-charset-property CHARSET PROPNAME)'." | |||
| 311 | This function is provided for backward compatibility. | 311 | This function is provided for backward compatibility. |
| 312 | Now we have the variable `charset-list'." | 312 | Now we have the variable `charset-list'." |
| 313 | charset-list) | 313 | charset-list) |
| 314 | (make-obsolete 'charset-list "Use variable `charset-list'" "22.1") | ||
| 314 | 315 | ||
| 315 | (defun generic-char-p (char) | 316 | (defun generic-char-p (char) |
| 316 | "Always return nil. This exists only for backward compatibility." | 317 | "Always return nil. This exists only for backward compatibility." |
| 317 | nil) | 318 | nil) |
| 319 | (make-obsolete 'generic-char-p "Generic characters no longer exist" "22.1") | ||
| 318 | 320 | ||
| 319 | ;; Coding system stuff | 321 | ;; Coding system stuff |
| 320 | 322 | ||
| @@ -428,8 +430,8 @@ selected. | |||
| 428 | `:ascii-compatible-p' (optional) | 430 | `:ascii-compatible-p' (optional) |
| 429 | 431 | ||
| 430 | If VALUE is non-nil, the coding system decodes all 7-bit bytes into | 432 | If VALUE is non-nil, the coding system decodes all 7-bit bytes into |
| 431 | the correponding ASCII characters, and encodes all ASCII characters | 433 | the corresponding ASCII characters, and encodes all ASCII characters |
| 432 | back to the correponding 7-bit bytes. If omitted, the VALUE defaults | 434 | back to the corresponding 7-bit bytes. If omitted, the VALUE defaults |
| 433 | to nil. | 435 | to nil. |
| 434 | 436 | ||
| 435 | `:decode-translation-table' (optional) | 437 | `:decode-translation-table' (optional) |
| @@ -488,15 +490,15 @@ GN-USAGE specifies the usage of graphic register GN as follows. | |||
| 488 | 490 | ||
| 489 | If it is nil, no charset can be designated to GN. | 491 | If it is nil, no charset can be designated to GN. |
| 490 | 492 | ||
| 491 | If it is a charset, the charset is initially designaged to GN, and | 493 | If it is a charset, the charset is initially designated to GN, and |
| 492 | never used by the other charsets. | 494 | never used by the other charsets. |
| 493 | 495 | ||
| 494 | If it is a list, the elements must be charsets, nil, 94, or 96. GN | 496 | If it is a list, the elements must be charsets, nil, 94, or 96. GN |
| 495 | can be used by all listed charsets. If the list contains 94, any | 497 | can be used by all listed charsets. If the list contains 94, any |
| 496 | charsets whose iso-chars is 94 can be designaged to GN. If the list | 498 | charsets whose iso-chars is 94 can be designated to GN. If the list |
| 497 | contains 96, any charsets whose iso-chars is 96 can be designaged to | 499 | contains 96, any charsets whose iso-chars is 96 can be designated to |
| 498 | GN. If the first element is a charset, the charset is initially | 500 | GN. If the first element is a charset, the charset is initially |
| 499 | designaged to GN. | 501 | designated to GN. |
| 500 | 502 | ||
| 501 | This attribute has a meaning only when `:coding-type' is `iso-2022'. | 503 | This attribute has a meaning only when `:coding-type' is `iso-2022'. |
| 502 | 504 | ||
| @@ -616,14 +618,19 @@ See the function `define-coding-system' for more detail." | |||
| 616 | (plist-get (coding-system-plist coding-system) :coding-type)) | 618 | (plist-get (coding-system-plist coding-system) :coding-type)) |
| 617 | 619 | ||
| 618 | (defun coding-system-charset-list (coding-system) | 620 | (defun coding-system-charset-list (coding-system) |
| 619 | "Return list of charsets supported by COIDNG-SYSTEM. | 621 | "Return list of charsets supported by CODING-SYSTEM. |
| 620 | If CODING-SYSTEM supports all ISO-2022 charsets, return `iso-2022'. | 622 | If CODING-SYSTEM supports all ISO-2022 charsets, return `iso-2022'. |
| 621 | If CODING-SYSTEM supports all emacs-mule charsets, return `emacs-mule'." | 623 | If CODING-SYSTEM supports all emacs-mule charsets, return `emacs-mule'." |
| 622 | (plist-get (coding-system-plist coding-system) :charset-list)) | 624 | (plist-get (coding-system-plist coding-system) :charset-list)) |
| 623 | 625 | ||
| 624 | (defun coding-system-get (coding-system prop) | 626 | (defun coding-system-get (coding-system prop) |
| 625 | "Extract a value from CODING-SYSTEM's property list for property PROP." | 627 | "Extract a value from CODING-SYSTEM's property list for property PROP. |
| 626 | (plist-get (coding-system-plist coding-system) prop)) | 628 | For compatibility with Emacs 20/21, this accepts old-style symbols |
| 629 | like `mime-charset' as well as the current style like `:mime-charset'." | ||
| 630 | (or (plist-get (coding-system-plist coding-system) prop) | ||
| 631 | (if (not (keywordp prop)) | ||
| 632 | (plist-get (coding-system-plist coding-system) | ||
| 633 | (intern (concat ":" (symbol-name prop))))))) | ||
| 627 | 634 | ||
| 628 | (defun coding-system-put (coding-system prop val) | 635 | (defun coding-system-put (coding-system prop val) |
| 629 | "Change value in CODING-SYSTEM's property list PROP to VAL." | 636 | "Change value in CODING-SYSTEM's property list PROP to VAL." |
| @@ -877,7 +884,9 @@ Now we have more convenient function `set-coding-system-priority'." | |||
| 877 | (setq l (cdr l))) | 884 | (setq l (cdr l))) |
| 878 | ;; Update `coding-category-list' and return it. | 885 | ;; Update `coding-category-list' and return it. |
| 879 | (setq coding-category-list (append arg current-list)) | 886 | (setq coding-category-list (append arg current-list)) |
| 887 | ;; Fixme: not defined. | ||
| 880 | (set-coding-priority-internal))) | 888 | (set-coding-priority-internal))) |
| 889 | (make-obsolete 'set-coding-priority 'set-coding-system-priority "22.1") | ||
| 881 | 890 | ||
| 882 | ;;; X selections | 891 | ;;; X selections |
| 883 | 892 | ||
| @@ -1477,6 +1486,7 @@ the table in `translation-table-vector'." | |||
| 1477 | (put 'with-category-table 'lisp-indent-function 1) | 1486 | (put 'with-category-table 'lisp-indent-function 1) |
| 1478 | 1487 | ||
| 1479 | (defmacro with-category-table (category-table &rest body) | 1488 | (defmacro with-category-table (category-table &rest body) |
| 1489 | "Execute BODY like `progn' with CATEGORY-TABLE the current category table." | ||
| 1480 | `(let ((current-category-table (category-table))) | 1490 | `(let ((current-category-table (category-table))) |
| 1481 | (set-category-table ,category-table) | 1491 | (set-category-table ,category-table) |
| 1482 | (unwind-protect | 1492 | (unwind-protect |