Mercurial > emacs
annotate lisp/international/characters.el @ 17323:15fa68d983e7
(ccl_driver): Fix bug of the case CCL_WriteArrayReadJump.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Mon, 07 Apr 1997 07:12:13 +0000 |
parents | dc3f449803f6 |
children | de6be7f3b904 |
rev | line source |
---|---|
17052 | 1 ;;; characters.el --- set syntax and category for multibyte characters |
2 | |
3 ;; Copyright (C) 1995 Free Software Foundation, Inc. | |
4 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. | |
5 | |
6 ;; Keywords: multibyte character, character set, syntax, category | |
7 | |
8 ;; This file is part of GNU Emacs. | |
9 | |
10 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
11 ;; it under the terms of the GNU General Public License as published by | |
12 ;; the Free Software Foundation; either version 2, or (at your option) | |
13 ;; any later version. | |
14 | |
15 ;; GNU Emacs is distributed in the hope that it will be useful, | |
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 ;; GNU General Public License for more details. | |
19 | |
20 ;; You should have received a copy of the GNU General Public License | |
17071 | 21 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
23 ;; Boston, MA 02111-1307, USA. | |
17052 | 24 |
25 ;;; Commentary: | |
26 | |
27 ;; This file contains multibyte characters. Save this file always in | |
17078
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
28 ;; the coding system `iso-2022-7'. |
17052 | 29 |
30 ;;; Predefined categories. | |
31 | |
32 ;; For each character set. | |
33 | |
34 (define-category ?a "ASCII") | |
35 (define-category ?l "Latin") | |
36 (define-category ?t "Thai") | |
37 (define-category ?g "Greek") | |
38 (define-category ?b "Arabic") | |
39 (define-category ?w "Hebrew") | |
40 (define-category ?y "Cyrillic") | |
41 (define-category ?k "Japanese katakana") | |
42 (define-category ?r "Japanese roman") | |
43 (define-category ?c "Chinese") | |
44 (define-category ?j "Japanese") | |
45 (define-category ?h "Korean") | |
46 (define-category ?e "Ethiopic (Ge'ez)") | |
47 (define-category ?v "Vietnamese") | |
48 (define-category ?i "Indian") | |
17078
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
49 (define-category ?o "Lao") |
17052 | 50 |
51 ;; For each group (row) of 2-byte character sets. | |
52 | |
53 (define-category ?A "Alpha numeric characters of 2-byte character sets") | |
54 (define-category ?C "Chinese (Han) characters of 2-byte character sets") | |
55 (define-category ?G "Greek characters of 2-byte characters sets") | |
56 (define-category ?H "Japanese Hiragana characters of 2-byte character sets") | |
57 (define-category ?K "Japanese Katakana characters of 2-byte character sets") | |
58 (define-category ?N "Korean Hangul characters of 2-byte character sets") | |
59 (define-category ?Y "Cyrillic character of 2-byte character sets") | |
60 (define-category ?I "Indian Glyphs") | |
61 | |
62 ;; For phonetic classifications. | |
63 | |
64 (define-category ?0 "consonant") | |
65 (define-category ?1 "base vowel") | |
66 (define-category ?2 "upper diacritical mark (including upper vowel)") | |
67 (define-category ?3 "lower diacritical mark (including lower vowel)") | |
68 (define-category ?4 "tone mark") | |
69 (define-category ?5 "vowel") | |
70 (define-category ?6 "digit") | |
71 (define-category ?7 "vowel-modifying diacritical mark") | |
17078
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
72 (define-category ?8 "vowel-signs") |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
73 (define-category ?9 "semivowel lower") |
17052 | 74 |
75 ;; For filling. | |
76 (define-category ?| "While filling, we can break a line at this character.") | |
77 | |
78 ;; Keep the followings for `kinsoku' processing. See comments in | |
79 ;; kinsoku.el. | |
80 (define-category ?> "A character which can't be placed at beginning of line.") | |
81 (define-category ?< "A character which can't be placed at end of line.") | |
82 | |
83 | |
84 ;;; Setting syntax and category. | |
85 | |
86 ;; ASCII | |
87 | |
88 (let ((ch 32)) | |
89 (while (< ch 127) ; All ASCII characters have | |
90 (modify-category-entry ch ?a) ; the category `a' (ASCII) | |
91 (modify-category-entry ch ?l) ; and `l' (Latin). | |
92 (setq ch (1+ ch)))) | |
93 | |
94 ;; Arabic character set | |
95 | |
96 (let ((charsets '(arabic-iso8859-6 | |
97 arabic-digit | |
98 arabic-1-column | |
99 arabic-2-column))) | |
100 (while charsets | |
101 (modify-syntax-entry (make-char (car charsets)) "w") | |
102 (modify-category-entry (make-char (car charsets)) ?b) | |
103 (setq charsets (cdr charsets)))) | |
104 | |
105 ;; Chinese character set (GB2312) | |
106 | |
107 (modify-syntax-entry (make-char 'chinese-gb2312) "w") | |
108 (modify-syntax-entry (make-char 'chinese-gb2312 33) "_") | |
109 (modify-syntax-entry (make-char 'chinese-gb2312 34) "_") | |
110 (modify-syntax-entry (make-char 'chinese-gb2312 41) "_") | |
111 (modify-syntax-entry ?\$A!2(B "($A!3(B") | |
112 (modify-syntax-entry ?\$A!4(B "($A!5(B") | |
113 (modify-syntax-entry ?\$A!6(B "($A!7(B") | |
114 (modify-syntax-entry ?\$A!8(B "($A!9(B") | |
115 (modify-syntax-entry ?\$A!:(B "($A!;(B") | |
116 (modify-syntax-entry ?\$A!<(B "($A!=(B") | |
117 (modify-syntax-entry ?\$A!>(B "($A!?(B") | |
118 (modify-syntax-entry ?\$A!3(B ")$A!2(B") | |
119 (modify-syntax-entry ?\$A!5(B ")$A!4(B") | |
120 (modify-syntax-entry ?\$A!7(B ")$A!6(B") | |
121 (modify-syntax-entry ?\$A!9(B ")$A!8(B") | |
122 (modify-syntax-entry ?\$A!;(B ")$A!:(B") | |
123 (modify-syntax-entry ?\$A!=(B ")$A!<(B") | |
124 (modify-syntax-entry ?\$A!?(B ")$A!>(B") | |
125 | |
126 (modify-category-entry (make-char 'chinese-gb2312) ?c) | |
127 (modify-category-entry (make-char 'chinese-gb2312) ?\|) | |
128 (modify-category-entry (make-char 'chinese-gb2312 35) ?A) | |
129 (modify-category-entry (make-char 'chinese-gb2312 36) ?H) | |
130 (modify-category-entry (make-char 'chinese-gb2312 37) ?K) | |
131 (modify-category-entry (make-char 'chinese-gb2312 38) ?G) | |
132 (modify-category-entry (make-char 'chinese-gb2312 39) ?Y) | |
133 (modify-category-entry (make-char 'chinese-gb2312 35) ?A) | |
134 (let ((row 48)) | |
135 (while (< row 127) | |
136 (modify-category-entry (make-char 'chinese-gb2312 row) ?C) | |
137 (setq row (1+ row)))) | |
138 | |
139 ;; Chinese character set (BIG5) | |
140 | |
141 (let ((generic-big5-1-char (make-char 'chinese-big5-1)) | |
142 (generic-big5-2-char (make-char 'chinese-big5-2))) | |
143 (modify-syntax-entry generic-big5-1-char "w") | |
144 (modify-syntax-entry generic-big5-2-char "w") | |
145 | |
146 (modify-category-entry generic-big5-1-char ?c) | |
147 (modify-category-entry generic-big5-2-char ?c) | |
148 | |
149 (modify-category-entry generic-big5-1-char ?C) | |
150 (modify-category-entry generic-big5-2-char ?C) | |
151 | |
152 (modify-category-entry generic-big5-1-char ?\|) | |
153 (modify-category-entry generic-big5-2-char ?\|)) | |
154 | |
155 | |
156 ;; Chinese character set (CNS11643) | |
157 | |
158 (let ((cns-list '(chinese-cns11643-1 | |
159 chinese-cns11643-2 | |
160 chinese-cns11643-3 | |
161 chinese-cns11643-4 | |
162 chinese-cns11643-5 | |
163 chinese-cns11643-6 | |
164 chinese-cns11643-7)) | |
165 generic-char) | |
166 (while cns-list | |
167 (setq generic-char (make-char (car cns-list))) | |
168 (modify-syntax-entry generic-char "w") | |
169 (modify-category-entry generic-char ?c) | |
170 (modify-category-entry generic-char ?C) | |
171 (modify-category-entry generic-char ?|) | |
172 (setq cns-list (cdr cns-list)))) | |
173 | |
174 ;; Cyrillic character set (ISO-8859-5) | |
175 | |
176 (modify-category-entry (make-char 'cyrillic-iso8859-5) ?y) | |
177 | |
178 (let ((c 160)) | |
179 (while (< c 256) | |
180 (modify-syntax-entry (make-char 'cyrillic-iso8859-5 c) "w") | |
181 (setq c (1+ c)))) | |
182 (modify-syntax-entry ?,L-(B ".") | |
183 (modify-syntax-entry ?,Lp(B ".") | |
184 (modify-syntax-entry ?,L}(B ".") | |
185 | |
186 ;; Ethiopic character set | |
187 | |
188 (modify-category-entry (make-char 'ethiopic) ?e) | |
189 | |
190 ;; European character set (Latin-1,2,3,4,5) | |
191 | |
192 (modify-category-entry (make-char 'latin-iso8859-1) ?l) | |
193 (modify-category-entry (make-char 'latin-iso8859-2) ?l) | |
194 (modify-category-entry (make-char 'latin-iso8859-3) ?l) | |
195 (modify-category-entry (make-char 'latin-iso8859-4) ?l) | |
196 (modify-category-entry (make-char 'latin-iso8859-9) ?l) | |
197 | |
198 ;; ISO-8859-1 (Latin-1) | |
199 (let ((c 64)) | |
200 (while (< c 128) ; from ',A@(B' to ',A(B' | |
201 (modify-syntax-entry (make-char 'latin-iso8859-1 c) "w") | |
202 (setq c (1+ c))) | |
203 (modify-syntax-entry (make-char 'latin-iso8859-1 32) "w") ; NBSP | |
204 (modify-syntax-entry ?,AW(B "_") | |
205 (modify-syntax-entry ?,Aw(B "_") | |
206 ) | |
207 | |
208 ;; ISO-8859-2 (Latin-2) | |
209 (let ((c 190)) | |
210 (while (< c 255) | |
211 (modify-syntax-entry (make-char 'latin-iso8859-2 c) "w") | |
212 (setq c (1+ c)))) | |
213 (let ((chars '(?,B!(B ?,B#(B ?,B%(B ?,B&(B ?,B)(B ?,B*(B ?,B+(B ?,B,(B ?,B.(B ?,B/(B ?,B1(B ?,B3(B ?,B5(B ?,B6(B ?,B9(B ?,B:(B ?,B;(B ?,B<(B))) | |
214 (while chars | |
215 (modify-syntax-entry (car chars) "w") | |
216 (setq chars (cdr chars)))) | |
217 (modify-syntax-entry (make-char 'latin-iso8859-2 160) "w") ; NBSP | |
218 (modify-syntax-entry ?,BW(B ".") | |
219 (modify-syntax-entry ?,Bw(B ".") | |
220 | |
221 ;; Greek character set (ISO-8859-7) | |
222 | |
223 (modify-category-entry (make-char 'greek-iso8859-7) ?g) | |
224 | |
225 (let ((c 182)) | |
226 (while (< c 255) | |
227 (modify-syntax-entry (make-char 'greek-iso8859-7 c) "w") | |
228 (setq c (1+ c)))) | |
229 (modify-syntax-entry (make-char 'greek-iso8859-7 160) "w") ; NBSP | |
230 (modify-syntax-entry ?,F7(B ".") | |
231 (modify-syntax-entry ?,F;(B ".") | |
232 (modify-syntax-entry ?,F=(B ".") | |
233 | |
234 ;; Hebrew character set (ISO-8859-8) | |
235 | |
236 (modify-category-entry (make-char 'hebrew-iso8859-8) ?w) | |
237 | |
238 (let ((c 224)) | |
239 (while (< c 251) | |
240 (modify-syntax-entry (make-char 'hebrew-iso8859-8 c) "w") | |
241 (setq c (1+ c)))) | |
242 (modify-syntax-entry (make-char 'hebrew-iso8859-8 160) "w") ; NBSP | |
243 | |
244 ;; Indian character set (IS 13194 and other Emacs original Indian charsets) | |
245 | |
246 (modify-category-entry (make-char 'indian-is13194) ?i) | |
247 (modify-category-entry (make-char 'indian-2-column) ?I) | |
248 (modify-category-entry (make-char 'indian-1-column) ?I) | |
249 | |
250 ;; Japanese character set (JISX0201-kana, JISX0201-roman, JISX0208, JISX0212) | |
251 | |
252 (modify-category-entry (make-char 'katakana-jisx0201) ?k) | |
253 (modify-category-entry (make-char 'latin-jisx0201) ?r) | |
254 (modify-category-entry (make-char 'japanese-jisx0208) ?j) | |
255 (modify-category-entry (make-char 'japanese-jisx0212) ?j) | |
256 (modify-category-entry (make-char 'japanese-jisx0208) ?\|) | |
257 | |
258 ;; JISX0208 | |
259 (modify-syntax-entry (make-char 'japanese-jisx0208) "w") | |
260 (modify-syntax-entry (make-char 'japanese-jisx0208 33) "_") | |
261 (modify-syntax-entry (make-char 'japanese-jisx0208 34) "_") | |
262 (modify-syntax-entry (make-char 'japanese-jisx0208 40) "_") | |
263 (let ((chars '(?$B!<(B ?$B!+(B ?$B!,(B ?$B!3(B ?$B!4(B ?$B!5(B ?$B!6(B ?$B!7(B ?$B!8(B ?$B!9(B ?$B!:(B ?$B!;(B))) | |
264 (while chars | |
265 (modify-syntax-entry (car chars) "w") | |
266 (setq chars (cdr chars)))) | |
267 (modify-syntax-entry ?\$B!J(B "($B!K(B") | |
268 (modify-syntax-entry ?\$B!N(B "($B!O(B") | |
269 (modify-syntax-entry ?\$B!P(B "($B!Q(B") | |
270 (modify-syntax-entry ?\$B!V(B "($B!W(B") | |
271 (modify-syntax-entry ?\$B!X(B "($B!Y(B") | |
272 (modify-syntax-entry ?\$B!K(B ")$B!J(B") | |
273 (modify-syntax-entry ?\$B!O(B ")$B!N(B") | |
274 (modify-syntax-entry ?\$B!Q(B ")$B!P(B") | |
275 (modify-syntax-entry ?\$B!W(B ")$B!V(B") | |
276 (modify-syntax-entry ?\$B!Y(B ")$B!X(B") | |
277 | |
278 (modify-category-entry (make-char 'japanese-jisx0208 35) ?A) | |
279 (modify-category-entry (make-char 'japanese-jisx0208 36) ?H) | |
280 (modify-category-entry (make-char 'japanese-jisx0208 37) ?K) | |
281 (modify-category-entry (make-char 'japanese-jisx0208 38) ?G) | |
282 (modify-category-entry (make-char 'japanese-jisx0208 39) ?Y) | |
283 (let ((row 48)) | |
284 (while (< row 127) | |
285 (modify-category-entry (make-char 'japanese-jisx0208 row) ?C) | |
286 (setq row (1+ row)))) | |
17296
dc3f449803f6
Change a category of one Japanese character.
Kenichi Handa <handa@m17n.org>
parents:
17078
diff
changeset
|
287 (modify-category-entry ?$B!<(B ?K) |
dc3f449803f6
Change a category of one Japanese character.
Kenichi Handa <handa@m17n.org>
parents:
17078
diff
changeset
|
288 (let ((chars '(?$B!+(B ?$B!,(B))) |
17052 | 289 (while chars |
290 (modify-category-entry (car chars) ?K) | |
291 (modify-category-entry (car chars) ?H) | |
292 (setq chars (cdr chars)))) | |
293 (let ((chars '(?$B!3(B ?$B!4(B ?$B!5(B ?$B!6(B ?$B!7(B ?$B!8(B ?$B!9(B ?$B!:(B ?$B!;(B))) | |
294 (while chars | |
295 (modify-category-entry (car chars) ?C) | |
296 (setq chars (cdr chars)))) | |
297 | |
298 ;; JISX0212 | |
299 (modify-syntax-entry (make-char 'japanese-jisx0212) "w") | |
300 (modify-syntax-entry (make-char 'japanese-jisx0212 33) "_") | |
301 (modify-syntax-entry (make-char 'japanese-jisx0212 34) "_") | |
302 (modify-syntax-entry (make-char 'japanese-jisx0212 35) "_") | |
303 | |
304 (modify-category-entry (make-char 'japanese-jisx0212 ) ?C) | |
305 | |
306 ;; JISX0201-Kana | |
307 (modify-syntax-entry (make-char 'katakana-jisx0201) "w") | |
308 (let ((chars '(?(I!(B ?(I"(B ?(I#(B ?(I$(B ?(I%(B))) | |
309 (while chars | |
310 (modify-syntax-entry (car chars) ".") | |
311 (setq chars (cdr chars)))) | |
312 | |
313 ;; Korean character set (KSC5601) | |
314 | |
315 (modify-syntax-entry (make-char 'korean-ksc5601) "w") | |
316 (modify-syntax-entry (make-char 'korean-ksc5601 33) "_") | |
317 (modify-syntax-entry (make-char 'korean-ksc5601 34) "_") | |
318 (modify-syntax-entry (make-char 'korean-ksc5601 38) "_") | |
319 (modify-syntax-entry (make-char 'korean-ksc5601 39) "_") | |
320 (modify-syntax-entry (make-char 'korean-ksc5601 40) "_") | |
321 (modify-syntax-entry (make-char 'korean-ksc5601 41) "_") | |
322 | |
323 (modify-category-entry (make-char 'korean-ksc5601) ?h) | |
324 (modify-category-entry (make-char 'korean-ksc5601 35) ?A) | |
325 (modify-category-entry (make-char 'korean-ksc5601 37) ?G) | |
326 (modify-category-entry (make-char 'korean-ksc5601 42) ?H) | |
327 (modify-category-entry (make-char 'korean-ksc5601 43) ?K) | |
328 (modify-category-entry (make-char 'korean-ksc5601 44) ?Y) | |
329 | |
17078
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
330 ;; Lao character set |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
331 |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
332 (modify-category-entry (make-char 'lao) ?o) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
333 |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
334 (let ((deflist '(;; chars syntax category |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
335 ("(1!(B-(1N(B" "w" ?0) ; consonant |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
336 ("(1PRS]`(B-(1d(B" "w" ?1) ; vowel base |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
337 ("(1QT(B-(1W[m(B" "w" ?2) ; vowel upper |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
338 ("(1XY(B" "w" ?3) ; vowel lower |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
339 ("(1h(B-(1l(B" "w" ?4) ; tone mark |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
340 ("(1\(B" "w" ?9) ; semivowel lower |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
341 ("(1p(B-(1y(B" "w" ?0) ; digit and misc |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
342 ("(1Of(B" "_" ?0) ; symbol |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
343 )) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
344 elm chars len syntax category to ch i) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
345 (while deflist |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
346 (setq elm (car deflist)) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
347 (setq chars (car elm) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
348 len (length chars) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
349 syntax (nth 1 elm) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
350 category (nth 2 elm) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
351 i 0) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
352 (while (< i len) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
353 (if (= (aref chars i) ?-) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
354 (setq i (1+ i) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
355 to (sref chars i)) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
356 (setq ch (sref chars i) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
357 to ch)) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
358 (while (<= ch to) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
359 (modify-syntax-entry ch syntax) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
360 (modify-category-entry ch category) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
361 (setq ch (1+ ch))) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
362 (setq i (+ i (char-bytes to)))) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
363 (setq deflist (cdr deflist)))) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
364 |
17052 | 365 ;; Thai character set (TIS620) |
366 | |
367 (modify-category-entry (make-char 'thai-tis620) ?t) | |
368 | |
369 (let ((deflist '(;; chars syntax category | |
370 (",T!(B-,TCEG(B-,TN(B" "w" ?0) ; consonant | |
371 (",TDFPRS`(B-,Te(B" "w" ?1) ; vowel base | |
372 (",TQT(B-,TWgn(B" "w" ?2) ; vowel upper | |
373 (",TX(B-,TZ(B" "w" ?3) ; vowel lower | |
374 (",Th(B-,Tm(B" "w" ?4) ; tone mark | |
375 (",TOfp(B-,Ty(B" "w" ?0) ; digit and misc | |
376 (",T_oz{(B" "_" ?0) ; symbol | |
377 )) | |
378 elm chars len syntax category to ch i) | |
379 (while deflist | |
380 (setq elm (car deflist)) | |
381 (setq chars (car elm) | |
382 len (length chars) | |
383 syntax (nth 1 elm) | |
384 category (nth 2 elm) | |
385 i 0) | |
386 (while (< i len) | |
387 (if (= (aref chars i) ?-) | |
388 (setq i (1+ i) | |
389 to (sref chars i)) | |
390 (setq ch (sref chars i) | |
391 to ch)) | |
392 (while (<= ch to) | |
393 (modify-syntax-entry ch syntax) | |
394 (modify-category-entry ch category) | |
395 (setq ch (1+ ch))) | |
396 (setq i (+ i (char-bytes to)))) | |
397 (setq deflist (cdr deflist)))) | |
398 | |
399 ;; Vietnamese character set | |
400 | |
401 (let ((lower (make-char 'vietnamese-viscii-lower)) | |
402 (upper (make-char 'vietnamese-viscii-upper))) | |
403 (modify-syntax-entry lower "w") | |
404 (modify-syntax-entry upper "w") | |
405 (modify-category-entry lower ?v) | |
406 (modify-category-entry upper ?v) | |
407 (modify-category-entry lower ?l) ; To make a word with | |
408 (modify-category-entry upper ?l) ; latin characters. | |
409 ) | |
410 | |
411 | |
412 ;;; Setting word boundary. | |
413 | |
414 (setq word-combining-categories | |
415 '((?l . ?l))) | |
416 | |
417 (setq word-separating-categories ; (2-byte character sets) | |
418 '((?A . ?K) ; Alpha numeric - Katakana | |
419 (?A . ?C) ; Alpha numeric - Chinese | |
420 (?H . ?A) ; Hiragana - Alpha numeric | |
421 (?H . ?K) ; Hiragana - Katakana | |
422 (?H . ?C) ; Hiragana - Chinese | |
423 (?K . ?A) ; Katakana - Alpha numeric | |
424 (?K . ?C) ; Katakana - Chinese | |
425 (?C . ?A) ; Chinese - Alpha numeric | |
426 (?C . ?K) ; Chinese - Katakana | |
427 )) |