aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love2002-05-17 16:51:14 +0000
committerDave Love2002-05-17 16:51:14 +0000
commit07513d644b4a4a69f5b4ad96b753d54dcd181205 (patch)
tree8e9ac6eb875177e7a1f36ab8282b6fba3275d358
parent981c8cc2e4cfa31bdfe7366c58c8e7f97aab1765 (diff)
downloademacs-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.el56
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.
50The remaining arguments must come in pairs ATTRIBUTE VALUE. ATTRIBUTE 50The remaining arguments must come in pairs ATTRIBUTE VALUE. ATTRIBUTE
51may be any symbol. The followings have special meanings, and one of 51may 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
61VALUE must be a string longer than `:short-name' to identify the 61VALUE must be a string longer than `:short-name' to identify the
62charset. If omitted, the value of `:short-name' attribute is used. 62charset. If omitted, the value of the `:short-name' attribute is used.
63 63
64`:dimension' 64`:dimension'
65 65
66VALUE must be an integer 0, 1, 2, or 3, specifying the dimension of 66VALUE must be an integer 0, 1, 2, or 3, specifying the dimension of
67code-points of the charsets. If omitted, it is calculated from a 67code-points of the charsets. If omitted, it is calculated from the
68value of `:code-space' attribute. 68value of the `:code-space' attribute.
69 69
70`:code-space' 70`:code-space'
71 71
72VALUE must be a vector of length at most 8 specifying the byte code 72VALUE must be a vector of length at most 8 specifying the byte code
73range of each dimension in this format: 73range of each dimension in this format:
74 [ MIN-1 MAX-1 MIN-2 MAX-2 ... ] 74 [ MIN-1 MAX-1 MIN-2 MAX-2 ... ]
75where, MIN-N is the minimum byte value of Nth dimension of code-point, 75where MIN-N is the minimum byte value of Nth dimension of code-point,
76MAX-N is the maximum byte value of that. 76MAX-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
97VALUE must be nil or t. If the VALUE is nil, the charset is a not 97VALUE must be nil or t (default nil). If VALUE is t, the charset is
98compatible with ASCII. The default value is nil. 98compatible with ASCII, i.e. the first 128 code points map to ASCII.
99 99
100`:supplementary-p' 100`:supplementary-p'
101 101
102VALUE must be nil or t. If the VALUE is t, the charset is 102VALUE must be nil or t. If the VALUE is t, the charset is
103supplementary, which means the charset is used only as a parent of 103supplementary, which means it is used only as a parent of some other
104some other charset. 104charset.
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
115VALUE must be an integer added to an index number of character to get 115VALUE must be an integer added to the index number of a character to
116the corresponding character code. 116get the corresponding character code.
117 117
118`:map' 118`:map'
119 119
@@ -121,7 +121,7 @@ VALUE must be vector or string.
121 121
122If it is a vector, the format is [ CODE-1 CHAR-1 CODE-2 CHAR-2 ... ], 122If it is a vector, the format is [ CODE-1 CHAR-1 CODE-2 CHAR-2 ... ],
123where CODE-n is a code-point of the charset, and CHAR-n is the 123where CODE-n is a code-point of the charset, and CHAR-n is the
124corresponding charcter code. 124corresponding character code.
125 125
126If it is a string, it is a name of file that contains the above 126If it is a string, it is a name of file that contains the above
127information. Each line of the file must be this format: 127information. Each line of the file must be this format:
@@ -144,7 +144,7 @@ VALUE must be vector or string.
144 144
145If it is a vector, the format is [ CODE-1 CHAR-1 CODE-2 CHAR-2 ... ], 145If it is a vector, the format is [ CODE-1 CHAR-1 CODE-2 CHAR-2 ... ],
146where CODE-n is a code-point of the charset, and CHAR-n is the 146where CODE-n is a code-point of the charset, and CHAR-n is the
147corresponding Unicode charcter code. 147corresponding Unicode character code.
148 148
149If it is a string, it is a name of file that contains the above 149If it is a string, it is a name of file that contains the above
150information. The file format is the same as what described for `:map' 150information. 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)'."
311This function is provided for backward compatibility. 311This function is provided for backward compatibility.
312Now we have the variable `charset-list'." 312Now 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
430If VALUE is non-nil, the coding system decodes all 7-bit bytes into 432If VALUE is non-nil, the coding system decodes all 7-bit bytes into
431the correponding ASCII characters, and encodes all ASCII characters 433the corresponding ASCII characters, and encodes all ASCII characters
432back to the correponding 7-bit bytes. If omitted, the VALUE defaults 434back to the corresponding 7-bit bytes. If omitted, the VALUE defaults
433to nil. 435to 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
489If it is nil, no charset can be designated to GN. 491If it is nil, no charset can be designated to GN.
490 492
491If it is a charset, the charset is initially designaged to GN, and 493If it is a charset, the charset is initially designated to GN, and
492never used by the other charsets. 494never used by the other charsets.
493 495
494If it is a list, the elements must be charsets, nil, 94, or 96. GN 496If it is a list, the elements must be charsets, nil, 94, or 96. GN
495can be used by all listed charsets. If the list contains 94, any 497can be used by all listed charsets. If the list contains 94, any
496charsets whose iso-chars is 94 can be designaged to GN. If the list 498charsets whose iso-chars is 94 can be designated to GN. If the list
497contains 96, any charsets whose iso-chars is 96 can be designaged to 499contains 96, any charsets whose iso-chars is 96 can be designated to
498GN. If the first element is a charset, the charset is initially 500GN. If the first element is a charset, the charset is initially
499designaged to GN. 501designated to GN.
500 502
501This attribute has a meaning only when `:coding-type' is `iso-2022'. 503This 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.
620If CODING-SYSTEM supports all ISO-2022 charsets, return `iso-2022'. 622If CODING-SYSTEM supports all ISO-2022 charsets, return `iso-2022'.
621If CODING-SYSTEM supports all emacs-mule charsets, return `emacs-mule'." 623If 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)) 628For compatibility with Emacs 20/21, this accepts old-style symbols
629like `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