aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/international/mule.el36
1 files changed, 30 insertions, 6 deletions
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index 7e06873afeb..32eac27d0c7 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -128,72 +128,97 @@ PLIST (property list) may contain any type of information a user
128 `(aref (charset-info ,charset) 0))) 128 `(aref (charset-info ,charset) 0)))
129 129
130(defmacro charset-bytes (charset) 130(defmacro charset-bytes (charset)
131 "Return bytes of CHARSET.
132See the function `charset-info' for more detail."
131 (if (quoted-symbol-p charset) 133 (if (quoted-symbol-p charset)
132 (aref (charset-info (nth 1 charset)) 1) 134 (aref (charset-info (nth 1 charset)) 1)
133 `(aref (charset-info ,charset) 1))) 135 `(aref (charset-info ,charset) 1)))
134 136
135(defmacro charset-dimension (charset) 137(defmacro charset-dimension (charset)
138 "Return dimension of CHARSET.
139See the function `charset-info' for more detail."
136 (if (quoted-symbol-p charset) 140 (if (quoted-symbol-p charset)
137 (aref (charset-info (nth 1 charset)) 2) 141 (aref (charset-info (nth 1 charset)) 2)
138 `(aref (charset-info ,charset) 2))) 142 `(aref (charset-info ,charset) 2)))
139 143
140(defmacro charset-chars (charset) 144(defmacro charset-chars (charset)
145 "Return character numbers contained in a dimension of CHARSET.
146See the function `charset-info' for more detail."
141 (if (quoted-symbol-p charset) 147 (if (quoted-symbol-p charset)
142 (aref (charset-info (nth 1 charset)) 3) 148 (aref (charset-info (nth 1 charset)) 3)
143 `(aref (charset-info ,charset) 3))) 149 `(aref (charset-info ,charset) 3)))
144 150
145(defmacro charset-width (charset) 151(defmacro charset-width (charset)
152 "Return width (how many column occupied on a screen) of CHARSET.
153See the function `charset-info' for more detail."
146 (if (quoted-symbol-p charset) 154 (if (quoted-symbol-p charset)
147 (aref (charset-info (nth 1 charset)) 4) 155 (aref (charset-info (nth 1 charset)) 4)
148 `(aref (charset-info ,charset) 4))) 156 `(aref (charset-info ,charset) 4)))
149 157
150(defmacro charset-direction (charset) 158(defmacro charset-direction (charset)
159 "Return direction of CHARSET.
160See the function `charset-info' for more detail."
151 (if (quoted-symbol-p charset) 161 (if (quoted-symbol-p charset)
152 (aref (charset-info (nth 1 charset)) 5) 162 (aref (charset-info (nth 1 charset)) 5)
153 `(aref (charset-info ,charset) 5))) 163 `(aref (charset-info ,charset) 5)))
154 164
155(defmacro charset-iso-final-char (charset) 165(defmacro charset-iso-final-char (charset)
166 "Return final char of CHARSET.
167See the function `charset-info' for more detail."
156 (if (quoted-symbol-p charset) 168 (if (quoted-symbol-p charset)
157 (aref (charset-info (nth 1 charset)) 8) 169 (aref (charset-info (nth 1 charset)) 8)
158 `(aref (charset-info ,charset) 8))) 170 `(aref (charset-info ,charset) 8)))
159 171
160(defmacro charset-iso-graphic-plane (charset) 172(defmacro charset-iso-graphic-plane (charset)
173 "Return graphic plane of CHARSET.
174See the function `charset-info' for more detail."
161 (if (quoted-symbol-p charset) 175 (if (quoted-symbol-p charset)
162 (aref (charset-info (nth 1 charset)) 9) 176 (aref (charset-info (nth 1 charset)) 9)
163 `(aref (charset-info ,charset) 9))) 177 `(aref (charset-info ,charset) 9)))
164 178
165(defmacro charset-reverse-charset (charset) 179(defmacro charset-reverse-charset (charset)
180 "Return reverse charset of CHARSET.
181See the function `charset-info' for more detail."
166 (if (quoted-symbol-p charset) 182 (if (quoted-symbol-p charset)
167 (aref (charset-info (nth 1 charset)) 10) 183 (aref (charset-info (nth 1 charset)) 10)
168 `(aref (charset-info ,charset) 10))) 184 `(aref (charset-info ,charset) 10)))
169 185
170(defmacro charset-short-name (charset) 186(defmacro charset-short-name (charset)
187 "Return short name of CHARSET.
188See the function `charset-info' for more detail."
171 (if (quoted-symbol-p charset) 189 (if (quoted-symbol-p charset)
172 (aref (charset-info (nth 1 charset)) 11) 190 (aref (charset-info (nth 1 charset)) 11)
173 `(aref (charset-info ,charset) 11))) 191 `(aref (charset-info ,charset) 11)))
174 192
175(defmacro charset-long-name (charset) 193(defmacro charset-long-name (charset)
194 "Return long name of CHARSET.
195See the function `charset-info' for more detail."
176 (if (quoted-symbol-p charset) 196 (if (quoted-symbol-p charset)
177 (aref (charset-info (nth 1 charset)) 12) 197 (aref (charset-info (nth 1 charset)) 12)
178 `(aref (charset-info ,charset) 12))) 198 `(aref (charset-info ,charset) 12)))
179 199
180(defmacro charset-description (charset) 200(defmacro charset-description (charset)
201 "Return descriptoin of CHARSET.
202See the function `charset-info' for more detail."
181 (if (quoted-symbol-p charset) 203 (if (quoted-symbol-p charset)
182 (aref (charset-info (nth 1 charset)) 13) 204 (aref (charset-info (nth 1 charset)) 13)
183 `(aref (charset-info ,charset) 13))) 205 `(aref (charset-info ,charset) 13)))
184 206
185(defmacro charset-plist (charset) 207(defmacro charset-plist (charset)
208 "Return list charset property of CHARSET.
209See the function `charset-info' for more detail."
186 (if (quoted-symbol-p charset) 210 (if (quoted-symbol-p charset)
187 `(aref ,(charset-info (nth 1 charset)) 14) 211 `(aref ,(charset-info (nth 1 charset)) 14)
188 `(aref (charset-info ,charset) 14))) 212 `(aref (charset-info ,charset) 14)))
189 213
190(defun set-charset-plist (charset plist) 214(defun set-charset-plist (charset plist)
215 "Set CHARSET's property list to PLIST, and retrun PLIST."
191 (aset (charset-info charset) 14 plist)) 216 (aset (charset-info charset) 14 plist))
192 217
193(defmacro make-char (charset &optional c1 c2) 218(defmacro make-char (charset &optional c1 c2)
194 "Return a character of CHARSET and position-codes CODE1 and CODE2. 219 "Return a character of CHARSET and position-codes CODE1 and CODE2.
195CODE1 and CODE2 are optional, but if you don't supply 220CODE1 and CODE2 are optional, but if you don't supply
196 sufficient position-codes, return a generic character which stands for 221sufficient position-codes, return a generic character which stands for
197all characters or group of characters in the character sets. 222all characters or group of characters in the character sets.
198A generic character can be used to index a char table (e.g. syntax-table)." 223A generic character can be used to index a char table (e.g. syntax-table)."
199 (if (quoted-symbol-p charset) 224 (if (quoted-symbol-p charset)
@@ -201,7 +226,10 @@ A generic character can be used to index a char table (e.g. syntax-table)."
201 `(make-char-internal (charset-id ,charset) ,c1 ,c2))) 226 `(make-char-internal (charset-id ,charset) ,c1 ,c2)))
202 227
203(defmacro charset-list () 228(defmacro charset-list ()
204 "Return list of charsets ever defined." 229 "Return list of charsets ever defined.
230
231This macro is provided for backward compatibility.
232Now we have the variable `charset-list'."
205 'charset-list) 233 'charset-list)
206 234
207(defsubst generic-char-p (char) 235(defsubst generic-char-p (char)
@@ -590,10 +618,6 @@ Return nil if there's no need of setting new buffer-file-coding-system."
590 (if (null (numberp found-eol)) 618 (if (null (numberp found-eol))
591 ;; But eol-type is not found. 619 ;; But eol-type is not found.
592 (setq found-eol nil)) 620 (setq found-eol nil))
593 (if (eq (coding-system-type coding) t)
594 ;; This is `undecided', which means nothing found except
595 ;; for eol-type.
596 (setq coding nil))
597 621
598 ;; The local setting takes precedence over the found one. 622 ;; The local setting takes precedence over the found one.
599 (setq new-coding (or local-coding coding)) 623 (setq new-coding (or local-coding coding))