Mercurial > emacs
annotate lisp/international/characters.el @ 23049:82a27d5b4582
(activate-input-method): Handle the
case that the arg INPUT-METHOD is nil correctly.
(read-multilingual-string): Activate the specified input method
before calling read-string. Afterward, activate the original
input method.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Tue, 18 Aug 1998 00:44:20 +0000 |
parents | d9eac134a41b |
children | d82b305ac37b |
rev | line source |
---|---|
17052 | 1 ;;; characters.el --- set syntax and category for multibyte characters |
2 | |
19958
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
3 ;; Copyright (C) 1995, 1997 Electrotechnical Laboratory, JAPAN. |
18377
8b4a66c66dd6
Change copyright notice.
Richard M. Stallman <rms@gnu.org>
parents:
18304
diff
changeset
|
4 ;; Licensed to the Free Software Foundation. |
17052 | 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 | |
18197
90235db802c7
Comment changed (iso-2022-7 -> iso-2022-7bit).
Kenichi Handa <handa@m17n.org>
parents:
17753
diff
changeset
|
28 ;; the coding system `iso-2022-7bit'. |
17052 | 29 |
18205
40dc3b2e9e27
Delete syntax stuff for Latin-1 and Latin-2.
Richard M. Stallman <rms@gnu.org>
parents:
18197
diff
changeset
|
30 ;; This file does not define the syntax for Latin-N character sets; |
40dc3b2e9e27
Delete syntax stuff for Latin-1 and Latin-2.
Richard M. Stallman <rms@gnu.org>
parents:
18197
diff
changeset
|
31 ;; those are defined by the files latin-N.el. |
40dc3b2e9e27
Delete syntax stuff for Latin-1 and Latin-2.
Richard M. Stallman <rms@gnu.org>
parents:
18197
diff
changeset
|
32 |
17052 | 33 ;;; Predefined categories. |
34 | |
35 ;; For each character set. | |
36 | |
37 (define-category ?a "ASCII") | |
38 (define-category ?l "Latin") | |
39 (define-category ?t "Thai") | |
40 (define-category ?g "Greek") | |
41 (define-category ?b "Arabic") | |
42 (define-category ?w "Hebrew") | |
43 (define-category ?y "Cyrillic") | |
44 (define-category ?k "Japanese katakana") | |
45 (define-category ?r "Japanese roman") | |
46 (define-category ?c "Chinese") | |
47 (define-category ?j "Japanese") | |
48 (define-category ?h "Korean") | |
49 (define-category ?e "Ethiopic (Ge'ez)") | |
50 (define-category ?v "Vietnamese") | |
51 (define-category ?i "Indian") | |
17078
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
52 (define-category ?o "Lao") |
17753
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
53 (define-category ?q "Tibetan") |
17052 | 54 |
55 ;; For each group (row) of 2-byte character sets. | |
56 | |
22529 | 57 (define-category ?A "Alpha-numeric characters of 2-byte character sets") |
17052 | 58 (define-category ?C "Chinese (Han) characters of 2-byte character sets") |
22529 | 59 (define-category ?G "Greek characters of 2-byte character sets") |
17052 | 60 (define-category ?H "Japanese Hiragana characters of 2-byte character sets") |
61 (define-category ?K "Japanese Katakana characters of 2-byte character sets") | |
62 (define-category ?N "Korean Hangul characters of 2-byte character sets") | |
22529 | 63 (define-category ?Y "Cyrillic characters of 2-byte character sets") |
17052 | 64 (define-category ?I "Indian Glyphs") |
65 | |
66 ;; For phonetic classifications. | |
67 | |
68 (define-category ?0 "consonant") | |
18561
f3c28fd5118e
Modify docstring of char category
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
69 (define-category ?1 "base (independent) vowel") |
17052 | 70 (define-category ?2 "upper diacritical mark (including upper vowel)") |
71 (define-category ?3 "lower diacritical mark (including lower vowel)") | |
72 (define-category ?4 "tone mark") | |
18561
f3c28fd5118e
Modify docstring of char category
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
73 (define-category ?5 "symbol") |
17052 | 74 (define-category ?6 "digit") |
75 (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
|
76 (define-category ?8 "vowel-signs") |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
77 (define-category ?9 "semivowel lower") |
17052 | 78 |
79 ;; For filling. | |
80 (define-category ?| "While filling, we can break a line at this character.") | |
81 | |
20247 | 82 ;; For indentation calculation. |
20734
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
83 (define-category ? |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
84 "This character counts as a space for indentation purposes.") |
20247 | 85 |
22529 | 86 ;; Keep the following for `kinsoku' processing. See comments in |
17052 | 87 ;; kinsoku.el. |
88 (define-category ?> "A character which can't be placed at beginning of line.") | |
89 (define-category ?< "A character which can't be placed at end of line.") | |
90 | |
91 | |
92 ;;; Setting syntax and category. | |
93 | |
94 ;; ASCII | |
95 | |
96 (let ((ch 32)) | |
97 (while (< ch 127) ; All ASCII characters have | |
98 (modify-category-entry ch ?a) ; the category `a' (ASCII) | |
99 (modify-category-entry ch ?l) ; and `l' (Latin). | |
100 (setq ch (1+ ch)))) | |
101 | |
102 ;; Arabic character set | |
103 | |
104 (let ((charsets '(arabic-iso8859-6 | |
105 arabic-digit | |
106 arabic-1-column | |
107 arabic-2-column))) | |
108 (while charsets | |
109 (modify-syntax-entry (make-char (car charsets)) "w") | |
110 (modify-category-entry (make-char (car charsets)) ?b) | |
111 (setq charsets (cdr charsets)))) | |
112 | |
113 ;; Chinese character set (GB2312) | |
114 | |
115 (modify-syntax-entry (make-char 'chinese-gb2312) "w") | |
116 (modify-syntax-entry (make-char 'chinese-gb2312 33) "_") | |
117 (modify-syntax-entry (make-char 'chinese-gb2312 34) "_") | |
118 (modify-syntax-entry (make-char 'chinese-gb2312 41) "_") | |
119 (modify-syntax-entry ?\$A!2(B "($A!3(B") | |
120 (modify-syntax-entry ?\$A!4(B "($A!5(B") | |
121 (modify-syntax-entry ?\$A!6(B "($A!7(B") | |
122 (modify-syntax-entry ?\$A!8(B "($A!9(B") | |
123 (modify-syntax-entry ?\$A!:(B "($A!;(B") | |
124 (modify-syntax-entry ?\$A!<(B "($A!=(B") | |
125 (modify-syntax-entry ?\$A!>(B "($A!?(B") | |
126 (modify-syntax-entry ?\$A!3(B ")$A!2(B") | |
127 (modify-syntax-entry ?\$A!5(B ")$A!4(B") | |
128 (modify-syntax-entry ?\$A!7(B ")$A!6(B") | |
129 (modify-syntax-entry ?\$A!9(B ")$A!8(B") | |
130 (modify-syntax-entry ?\$A!;(B ")$A!:(B") | |
131 (modify-syntax-entry ?\$A!=(B ")$A!<(B") | |
132 (modify-syntax-entry ?\$A!?(B ")$A!>(B") | |
133 | |
134 (modify-category-entry (make-char 'chinese-gb2312) ?c) | |
135 (modify-category-entry (make-char 'chinese-gb2312) ?\|) | |
136 (modify-category-entry (make-char 'chinese-gb2312 35) ?A) | |
137 (modify-category-entry (make-char 'chinese-gb2312 36) ?H) | |
138 (modify-category-entry (make-char 'chinese-gb2312 37) ?K) | |
139 (modify-category-entry (make-char 'chinese-gb2312 38) ?G) | |
140 (modify-category-entry (make-char 'chinese-gb2312 39) ?Y) | |
141 (modify-category-entry (make-char 'chinese-gb2312 35) ?A) | |
142 (let ((row 48)) | |
143 (while (< row 127) | |
144 (modify-category-entry (make-char 'chinese-gb2312 row) ?C) | |
145 (setq row (1+ row)))) | |
146 | |
147 ;; Chinese character set (BIG5) | |
148 | |
149 (let ((generic-big5-1-char (make-char 'chinese-big5-1)) | |
150 (generic-big5-2-char (make-char 'chinese-big5-2))) | |
151 (modify-syntax-entry generic-big5-1-char "w") | |
152 (modify-syntax-entry generic-big5-2-char "w") | |
153 | |
154 (modify-category-entry generic-big5-1-char ?c) | |
155 (modify-category-entry generic-big5-2-char ?c) | |
156 | |
157 (modify-category-entry generic-big5-1-char ?C) | |
158 (modify-category-entry generic-big5-2-char ?C) | |
159 | |
160 (modify-category-entry generic-big5-1-char ?\|) | |
161 (modify-category-entry generic-big5-2-char ?\|)) | |
162 | |
163 | |
164 ;; Chinese character set (CNS11643) | |
165 | |
166 (let ((cns-list '(chinese-cns11643-1 | |
167 chinese-cns11643-2 | |
168 chinese-cns11643-3 | |
169 chinese-cns11643-4 | |
170 chinese-cns11643-5 | |
171 chinese-cns11643-6 | |
172 chinese-cns11643-7)) | |
173 generic-char) | |
174 (while cns-list | |
175 (setq generic-char (make-char (car cns-list))) | |
176 (modify-syntax-entry generic-char "w") | |
177 (modify-category-entry generic-char ?c) | |
178 (modify-category-entry generic-char ?C) | |
179 (modify-category-entry generic-char ?|) | |
180 (setq cns-list (cdr cns-list)))) | |
181 | |
182 ;; Cyrillic character set (ISO-8859-5) | |
183 | |
184 (modify-category-entry (make-char 'cyrillic-iso8859-5) ?y) | |
185 | |
19958
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
186 (modify-syntax-entry (make-char 'cyrillic-iso8859-5 160) " ") |
17052 | 187 (modify-syntax-entry ?,L-(B ".") |
188 (modify-syntax-entry ?,Lp(B ".") | |
189 (modify-syntax-entry ?,L}(B ".") | |
19958
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
190 (let ((tbl (standard-case-table))) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
191 (set-case-syntax-pair ?,L!(B ?,Lq(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
192 (set-case-syntax-pair ?,L"(B ?,Lr(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
193 (set-case-syntax-pair ?,L#(B ?,Ls(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
194 (set-case-syntax-pair ?,L$(B ?,Lt(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
195 (set-case-syntax-pair ?,L%(B ?,Lu(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
196 (set-case-syntax-pair ?,L&(B ?,Lv(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
197 (set-case-syntax-pair ?,L'(B ?,Lw(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
198 (set-case-syntax-pair ?,L((B ?,Lx(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
199 (set-case-syntax-pair ?,L)(B ?,Ly(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
200 (set-case-syntax-pair ?,L*(B ?,Lz(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
201 (set-case-syntax-pair ?,L+(B ?,L{(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
202 (set-case-syntax-pair ?,L,(B ?,L|(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
203 (set-case-syntax-pair ?,L.(B ?,L~(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
204 (set-case-syntax-pair ?,L/(B ?,L(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
205 (set-case-syntax-pair ?,L0(B ?,LP(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
206 (set-case-syntax-pair ?,L1(B ?,LQ(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
207 (set-case-syntax-pair ?,L2(B ?,LR(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
208 (set-case-syntax-pair ?,L3(B ?,LS(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
209 (set-case-syntax-pair ?,L4(B ?,LT(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
210 (set-case-syntax-pair ?,L5(B ?,LU(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
211 (set-case-syntax-pair ?,L6(B ?,LV(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
212 (set-case-syntax-pair ?,L7(B ?,LW(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
213 (set-case-syntax-pair ?,L8(B ?,LX(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
214 (set-case-syntax-pair ?,L9(B ?,LY(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
215 (set-case-syntax-pair ?,L:(B ?,LZ(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
216 (set-case-syntax-pair ?,L;(B ?,L[(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
217 (set-case-syntax-pair ?,L<(B ?,L\(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
218 (set-case-syntax-pair ?,L=(B ?,L](B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
219 (set-case-syntax-pair ?,L>(B ?,L^(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
220 (set-case-syntax-pair ?,L?(B ?,L_(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
221 (set-case-syntax-pair ?,L@(B ?,L`(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
222 (set-case-syntax-pair ?,LA(B ?,La(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
223 (set-case-syntax-pair ?,LB(B ?,Lb(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
224 (set-case-syntax-pair ?,LC(B ?,Lc(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
225 (set-case-syntax-pair ?,LD(B ?,Ld(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
226 (set-case-syntax-pair ?,LE(B ?,Le(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
227 (set-case-syntax-pair ?,LF(B ?,Lf(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
228 (set-case-syntax-pair ?,LG(B ?,Lg(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
229 (set-case-syntax-pair ?,LH(B ?,Lh(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
230 (set-case-syntax-pair ?,LI(B ?,Li(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
231 (set-case-syntax-pair ?,LJ(B ?,Lj(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
232 (set-case-syntax-pair ?,LK(B ?,Lk(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
233 (set-case-syntax-pair ?,LL(B ?,Ll(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
234 (set-case-syntax-pair ?,LM(B ?,Lm(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
235 (set-case-syntax-pair ?,LN(B ?,Ln(B tbl) |
f7ab34ae92bb
Set case-table for Cyrillic characters.
Richard M. Stallman <rms@gnu.org>
parents:
18561
diff
changeset
|
236 (set-case-syntax-pair ?,LO(B ?,Lo(B tbl)) |
17052 | 237 |
17753
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
238 ;; Devanagari character set |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
239 |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
240 (let ((deflist '(;; chars syntax category |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
241 ("$(5!!!"!#(B" "w" ?7) ; vowel-modifying diacritical mark |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
242 ; chandrabindu, anuswar, visarga |
18561
f3c28fd5118e
Modify docstring of char category
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
243 ("$(5!$(B-$(5!2(B" "w" ?1) ; independent vowel |
17753
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
244 ("$(5!3(B-$(5!X(B" "w" ?0) ; consonant |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
245 ("$(5!Z(B-$(5!g(B" "w" ?8) ; matra |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
246 ("$(5!q(B-$(5!z(B" "w" ?6) ; digit |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
247 )) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
248 elm chars len syntax category to ch i) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
249 (while deflist |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
250 (setq elm (car deflist)) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
251 (setq chars (car elm) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
252 len (length chars) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
253 syntax (nth 1 elm) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
254 category (nth 2 elm) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
255 i 0) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
256 (while (< i len) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
257 (if (= (aref chars i) ?-) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
258 (setq i (1+ i) |
20843 | 259 to (aref chars i)) |
260 (setq ch (aref chars i) | |
17753
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
261 to ch)) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
262 (while (<= ch to) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
263 (modify-syntax-entry ch syntax) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
264 (modify-category-entry ch category) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
265 (setq ch (1+ ch))) |
20843 | 266 (setq i (1+ i))) |
17753
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
267 (setq deflist (cdr deflist)))) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
268 |
17052 | 269 ;; Ethiopic character set |
270 | |
271 (modify-category-entry (make-char 'ethiopic) ?e) | |
18304
58b39b4108d5
Set syntaxes of Ethiopic characters.
Kenichi Handa <handa@m17n.org>
parents:
18205
diff
changeset
|
272 (modify-syntax-entry (make-char 'ethiopic) "w") |
58b39b4108d5
Set syntaxes of Ethiopic characters.
Kenichi Handa <handa@m17n.org>
parents:
18205
diff
changeset
|
273 (let ((chars '(?$(3$h(B ?$(3$i(B ?$(3$j(B ?$(3$k(B ?$(3$l(B ?$(3$m(B ?$(3$n(B ?$(3$o(B ?$(3%i(B ?$(3%t(B ?$(3%u(B ?$(3%v(B ?$(3%w(B ?$(3%x(B))) |
58b39b4108d5
Set syntaxes of Ethiopic characters.
Kenichi Handa <handa@m17n.org>
parents:
18205
diff
changeset
|
274 (while chars |
58b39b4108d5
Set syntaxes of Ethiopic characters.
Kenichi Handa <handa@m17n.org>
parents:
18205
diff
changeset
|
275 (modify-syntax-entry (car chars) ".") |
58b39b4108d5
Set syntaxes of Ethiopic characters.
Kenichi Handa <handa@m17n.org>
parents:
18205
diff
changeset
|
276 (setq chars (cdr chars)))) |
17052 | 277 |
278 ;; European character set (Latin-1,2,3,4,5) | |
279 | |
280 (modify-category-entry (make-char 'latin-iso8859-1) ?l) | |
281 (modify-category-entry (make-char 'latin-iso8859-2) ?l) | |
282 (modify-category-entry (make-char 'latin-iso8859-3) ?l) | |
283 (modify-category-entry (make-char 'latin-iso8859-4) ?l) | |
284 (modify-category-entry (make-char 'latin-iso8859-9) ?l) | |
285 | |
20247 | 286 (modify-category-entry (make-char 'latin-iso8859-1 160) ?\ ) |
287 (modify-category-entry (make-char 'latin-iso8859-2 160) ?\ ) | |
288 (modify-category-entry (make-char 'latin-iso8859-3 160) ?\ ) | |
289 (modify-category-entry (make-char 'latin-iso8859-4 160) ?\ ) | |
290 (modify-category-entry (make-char 'latin-iso8859-9 160) ?\ ) | |
291 | |
17052 | 292 ;; Greek character set (ISO-8859-7) |
293 | |
294 (modify-category-entry (make-char 'greek-iso8859-7) ?g) | |
295 | |
296 (let ((c 182)) | |
297 (while (< c 255) | |
298 (modify-syntax-entry (make-char 'greek-iso8859-7 c) "w") | |
299 (setq c (1+ c)))) | |
300 (modify-syntax-entry (make-char 'greek-iso8859-7 160) "w") ; NBSP | |
301 (modify-syntax-entry ?,F7(B ".") | |
302 (modify-syntax-entry ?,F;(B ".") | |
303 (modify-syntax-entry ?,F=(B ".") | |
304 | |
305 ;; Hebrew character set (ISO-8859-8) | |
306 | |
307 (modify-category-entry (make-char 'hebrew-iso8859-8) ?w) | |
308 | |
309 (let ((c 224)) | |
310 (while (< c 251) | |
311 (modify-syntax-entry (make-char 'hebrew-iso8859-8 c) "w") | |
312 (setq c (1+ c)))) | |
313 (modify-syntax-entry (make-char 'hebrew-iso8859-8 160) "w") ; NBSP | |
314 | |
315 ;; Indian character set (IS 13194 and other Emacs original Indian charsets) | |
316 | |
317 (modify-category-entry (make-char 'indian-is13194) ?i) | |
318 (modify-category-entry (make-char 'indian-2-column) ?I) | |
319 (modify-category-entry (make-char 'indian-1-column) ?I) | |
320 | |
20843 | 321 (let ((deflist |
322 '(;; chars syntax category | |
323 ("(5!"#(B" "w" ?7) ; vowel-modifying diacritical mark | |
324 ; chandrabindu, anuswar, visarga | |
325 ("(5$(B-(52(B" "w" ?1) ; base (independent) vowel | |
326 ("(53(B-(5X(B" "w" ?0) ; consonant | |
327 ("(5Z(B-(5g(B" "w" ?8) ; matra | |
328 ("(5q(B-(5z(B" "w" ?6) ; digit | |
329 )) | |
330 elm chars len syntax category to ch i) | |
331 (while deflist | |
332 (setq elm (car deflist)) | |
333 (setq chars (car elm) | |
334 len (length chars) | |
335 syntax (nth 1 elm) | |
336 category (nth 2 elm) | |
337 i 0) | |
338 (while (< i len) | |
339 (if (= (aref chars i) ?-) | |
340 (setq i (1+ i) | |
341 to (aref chars i)) | |
342 (setq ch (aref chars i) | |
343 to ch)) | |
344 (while (<= ch to) | |
345 (modify-syntax-entry ch syntax) | |
346 (modify-category-entry ch category) | |
347 (setq ch (1+ ch))) | |
348 (setq i (1+ i))) | |
349 (setq deflist (cdr deflist)))) | |
350 | |
351 | |
17052 | 352 ;; Japanese character set (JISX0201-kana, JISX0201-roman, JISX0208, JISX0212) |
353 | |
354 (modify-category-entry (make-char 'katakana-jisx0201) ?k) | |
355 (modify-category-entry (make-char 'latin-jisx0201) ?r) | |
356 (modify-category-entry (make-char 'japanese-jisx0208) ?j) | |
357 (modify-category-entry (make-char 'japanese-jisx0212) ?j) | |
17753
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
358 (modify-category-entry (make-char 'katakana-jisx0201) ?\|) |
17052 | 359 (modify-category-entry (make-char 'japanese-jisx0208) ?\|) |
17753
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
360 (modify-category-entry (make-char 'japanese-jisx0212) ?\|) |
17052 | 361 |
362 ;; JISX0208 | |
363 (modify-syntax-entry (make-char 'japanese-jisx0208) "w") | |
364 (modify-syntax-entry (make-char 'japanese-jisx0208 33) "_") | |
365 (modify-syntax-entry (make-char 'japanese-jisx0208 34) "_") | |
366 (modify-syntax-entry (make-char 'japanese-jisx0208 40) "_") | |
367 (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))) | |
368 (while chars | |
369 (modify-syntax-entry (car chars) "w") | |
370 (setq chars (cdr chars)))) | |
371 (modify-syntax-entry ?\$B!J(B "($B!K(B") | |
372 (modify-syntax-entry ?\$B!N(B "($B!O(B") | |
373 (modify-syntax-entry ?\$B!P(B "($B!Q(B") | |
374 (modify-syntax-entry ?\$B!V(B "($B!W(B") | |
375 (modify-syntax-entry ?\$B!X(B "($B!Y(B") | |
376 (modify-syntax-entry ?\$B!K(B ")$B!J(B") | |
377 (modify-syntax-entry ?\$B!O(B ")$B!N(B") | |
378 (modify-syntax-entry ?\$B!Q(B ")$B!P(B") | |
379 (modify-syntax-entry ?\$B!W(B ")$B!V(B") | |
380 (modify-syntax-entry ?\$B!Y(B ")$B!X(B") | |
381 | |
382 (modify-category-entry (make-char 'japanese-jisx0208 35) ?A) | |
383 (modify-category-entry (make-char 'japanese-jisx0208 36) ?H) | |
384 (modify-category-entry (make-char 'japanese-jisx0208 37) ?K) | |
385 (modify-category-entry (make-char 'japanese-jisx0208 38) ?G) | |
386 (modify-category-entry (make-char 'japanese-jisx0208 39) ?Y) | |
387 (let ((row 48)) | |
388 (while (< row 127) | |
389 (modify-category-entry (make-char 'japanese-jisx0208 row) ?C) | |
390 (setq row (1+ row)))) | |
17296
dc3f449803f6
Change a category of one Japanese character.
Kenichi Handa <handa@m17n.org>
parents:
17078
diff
changeset
|
391 (modify-category-entry ?$B!<(B ?K) |
dc3f449803f6
Change a category of one Japanese character.
Kenichi Handa <handa@m17n.org>
parents:
17078
diff
changeset
|
392 (let ((chars '(?$B!+(B ?$B!,(B))) |
17052 | 393 (while chars |
394 (modify-category-entry (car chars) ?K) | |
395 (modify-category-entry (car chars) ?H) | |
396 (setq chars (cdr chars)))) | |
397 (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))) | |
398 (while chars | |
399 (modify-category-entry (car chars) ?C) | |
400 (setq chars (cdr chars)))) | |
401 | |
402 ;; JISX0212 | |
403 (modify-syntax-entry (make-char 'japanese-jisx0212) "w") | |
404 (modify-syntax-entry (make-char 'japanese-jisx0212 33) "_") | |
405 (modify-syntax-entry (make-char 'japanese-jisx0212 34) "_") | |
406 (modify-syntax-entry (make-char 'japanese-jisx0212 35) "_") | |
407 | |
408 (modify-category-entry (make-char 'japanese-jisx0212 ) ?C) | |
409 | |
410 ;; JISX0201-Kana | |
411 (modify-syntax-entry (make-char 'katakana-jisx0201) "w") | |
412 (let ((chars '(?(I!(B ?(I"(B ?(I#(B ?(I$(B ?(I%(B))) | |
413 (while chars | |
414 (modify-syntax-entry (car chars) ".") | |
415 (setq chars (cdr chars)))) | |
416 | |
417 ;; Korean character set (KSC5601) | |
418 | |
419 (modify-syntax-entry (make-char 'korean-ksc5601) "w") | |
420 (modify-syntax-entry (make-char 'korean-ksc5601 33) "_") | |
421 (modify-syntax-entry (make-char 'korean-ksc5601 34) "_") | |
422 (modify-syntax-entry (make-char 'korean-ksc5601 38) "_") | |
423 (modify-syntax-entry (make-char 'korean-ksc5601 39) "_") | |
424 (modify-syntax-entry (make-char 'korean-ksc5601 40) "_") | |
425 (modify-syntax-entry (make-char 'korean-ksc5601 41) "_") | |
426 | |
427 (modify-category-entry (make-char 'korean-ksc5601) ?h) | |
428 (modify-category-entry (make-char 'korean-ksc5601 35) ?A) | |
429 (modify-category-entry (make-char 'korean-ksc5601 37) ?G) | |
430 (modify-category-entry (make-char 'korean-ksc5601 42) ?H) | |
431 (modify-category-entry (make-char 'korean-ksc5601 43) ?K) | |
432 (modify-category-entry (make-char 'korean-ksc5601 44) ?Y) | |
433 | |
17078
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
434 ;; Lao character set |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
435 |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
436 (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
|
437 |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
438 (let ((deflist '(;; chars syntax category |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
439 ("(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
|
440 ("(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
|
441 ("(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
|
442 ("(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
|
443 ("(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
|
444 ("(1\(B" "w" ?9) ; semivowel lower |
18561
f3c28fd5118e
Modify docstring of char category
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
445 ("(1p(B-(1y(B" "w" ?6) ; digit |
17078
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
446 ("(1Of(B" "_" ?0) ; symbol |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
447 )) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
448 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
|
449 (while deflist |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
450 (setq elm (car deflist)) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
451 (setq chars (car elm) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
452 len (length chars) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
453 syntax (nth 1 elm) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
454 category (nth 2 elm) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
455 i 0) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
456 (while (< i len) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
457 (if (= (aref chars i) ?-) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
458 (setq i (1+ i) |
20843 | 459 to (aref chars i)) |
460 (setq ch (aref chars i) | |
17078
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
461 to ch)) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
462 (while (<= ch to) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
463 (modify-syntax-entry ch syntax) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
464 (modify-category-entry ch category) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
465 (setq ch (1+ ch))) |
20843 | 466 (setq i (1+ i))) |
17078
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
467 (setq deflist (cdr deflist)))) |
874b471d6635
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
468 |
17052 | 469 ;; Thai character set (TIS620) |
470 | |
471 (modify-category-entry (make-char 'thai-tis620) ?t) | |
472 | |
473 (let ((deflist '(;; chars syntax category | |
474 (",T!(B-,TCEG(B-,TN(B" "w" ?0) ; consonant | |
475 (",TDFPRS`(B-,Te(B" "w" ?1) ; vowel base | |
476 (",TQT(B-,TWgn(B" "w" ?2) ; vowel upper | |
477 (",TX(B-,TZ(B" "w" ?3) ; vowel lower | |
478 (",Th(B-,Tm(B" "w" ?4) ; tone mark | |
18561
f3c28fd5118e
Modify docstring of char category
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
479 (",Tp(B-,Ty(B" "w" ?6) ; digit |
f3c28fd5118e
Modify docstring of char category
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
480 (",TOf_oz{(B" "_" ?5) ; symbol |
17052 | 481 )) |
482 elm chars len syntax category to ch i) | |
483 (while deflist | |
484 (setq elm (car deflist)) | |
485 (setq chars (car elm) | |
486 len (length chars) | |
487 syntax (nth 1 elm) | |
488 category (nth 2 elm) | |
489 i 0) | |
490 (while (< i len) | |
491 (if (= (aref chars i) ?-) | |
492 (setq i (1+ i) | |
20843 | 493 to (aref chars i)) |
494 (setq ch (aref chars i) | |
17052 | 495 to ch)) |
496 (while (<= ch to) | |
497 (modify-syntax-entry ch syntax) | |
498 (modify-category-entry ch category) | |
499 (setq ch (1+ ch))) | |
20843 | 500 (setq i (1+ i))) |
17052 | 501 (setq deflist (cdr deflist)))) |
502 | |
17753
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
503 ;; Tibetan character set |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
504 |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
505 (let ((row 33)) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
506 (while (< row 38) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
507 (modify-category-entry (make-char 'tibetan row) ?q) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
508 (setq row (1+ row)))) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
509 |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
510 (modify-category-entry (make-char 'tibetan-1-column 33) ?q) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
511 |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
512 (let ((deflist '(;; chars syntax category |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
513 ("$(7"!(B-$(7"J(B" "w" ?0) ; consonant |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
514 ("$(7#!(B-$(7#J#P#Q(B" "w" ?0) ; |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
515 ("$(7$!(B-$(7$e(B" "w" ?0) ; |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
516 ("$(7%!(B-$(7%u(B" "w" ?0) ; |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
517 ("$(7"S"["\"]"^"a(B" "w" ?2) ; upper vowel |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
518 ("$(7"_"c"d"g"h"i"j"k"l(B" "w" ?2) ; upper modifier |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
519 ("$(7!I"Q"U"e!e!g(B" "w" ?3) ; lowel vowel/modifier |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
520 ("$(7!P(B-$(7!Y!Z(B-$(7!c(B" "w" ?6) ; digit |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
521 ("$(7!;!=(B-$(7!B!D"`(B" "." ?|) ; line-break char |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
522 ("$(8!;!=!?!@!A!D"`(B" "." ?|) ; |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
523 ("$(7!8!;!=(B-$(7!B!D"`!m!d(B" "." ?>) ; prohibition |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
524 ("$(8!;!=!?!@!A!D"`(B" "." ?>) ; |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
525 ("$(7!0(B-$(7!:!l#R#S"f(B" "." ?<) ; prohibition |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
526 ("$(7!C!E(B-$(7!H!J(B-$(7!O!f!h(B-$(7!k!n!o(B" "." ?q) ; others |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
527 )) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
528 elm chars len syntax category to ch i) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
529 (while deflist |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
530 (setq elm (car deflist)) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
531 (setq chars (car elm) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
532 len (length chars) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
533 syntax (nth 1 elm) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
534 category (nth 2 elm) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
535 i 0) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
536 (while (< i len) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
537 (if (= (aref chars i) ?-) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
538 (setq i (1+ i) |
20843 | 539 to (aref chars i)) |
540 (setq ch (aref chars i) | |
17753
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
541 to ch)) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
542 (while (<= ch to) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
543 (modify-syntax-entry ch syntax) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
544 (modify-category-entry ch category) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
545 (setq ch (1+ ch))) |
20843 | 546 (setq i (1+ i))) |
17753
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
547 (setq deflist (cdr deflist)))) |
de6be7f3b904
Set syntax and category for Devanagari, Thai, and
Kenichi Handa <handa@m17n.org>
parents:
17296
diff
changeset
|
548 |
17052 | 549 ;; Vietnamese character set |
550 | |
551 (let ((lower (make-char 'vietnamese-viscii-lower)) | |
552 (upper (make-char 'vietnamese-viscii-upper))) | |
553 (modify-syntax-entry lower "w") | |
554 (modify-syntax-entry upper "w") | |
555 (modify-category-entry lower ?v) | |
556 (modify-category-entry upper ?v) | |
557 (modify-category-entry lower ?l) ; To make a word with | |
558 (modify-category-entry upper ?l) ; latin characters. | |
559 ) | |
560 | |
561 | |
562 ;;; Setting word boundary. | |
563 | |
564 (setq word-combining-categories | |
565 '((?l . ?l))) | |
566 | |
567 (setq word-separating-categories ; (2-byte character sets) | |
568 '((?A . ?K) ; Alpha numeric - Katakana | |
569 (?A . ?C) ; Alpha numeric - Chinese | |
570 (?H . ?A) ; Hiragana - Alpha numeric | |
571 (?H . ?K) ; Hiragana - Katakana | |
572 (?H . ?C) ; Hiragana - Chinese | |
573 (?K . ?A) ; Katakana - Alpha numeric | |
574 (?K . ?C) ; Katakana - Chinese | |
575 (?C . ?A) ; Chinese - Alpha numeric | |
576 (?C . ?K) ; Chinese - Katakana | |
577 )) | |
20734
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
578 |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
579 |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
580 ;; For each character set, put the information of the most proper |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
581 ;; coding system to encode it by `prefered-coding-system' property. |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
582 |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
583 (let ((l '((latin-iso8859-1 . iso-latin-1) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
584 (latin-iso8859-2 . iso-latin-2) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
585 (latin-iso8859-3 . iso-latin-3) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
586 (latin-iso8859-4 . iso-latin-4) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
587 (thai-tis620 . thai-tis620) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
588 (greek-iso8859-7 . greek-iso-8bit) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
589 (arabic-iso8859-6 . iso-2022-7bit) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
590 (hebrew-iso8859-8 . hebrew-iso-8bit) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
591 (katakana-jisx0201 . japanese-shift-jis) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
592 (latin-jisx0201 . japanese-shift-jis) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
593 (cyrillic-iso8859-5 . cyrillic-iso-8bit) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
594 (latin-iso8859-9 . iso-latin-5) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
595 (japanese-jisx0208-1978 . iso-2022-jp) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
596 (chinese-gb2312 . cn-gb-2312) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
597 (japanese-jisx0208 . iso-2022-jp) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
598 (korean-ksc5601 . iso-2022-kr) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
599 (japanese-jisx0212 . iso-2022-jp) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
600 (chinese-cns11643-1 . iso-2022-cn) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
601 (chinese-cns11643-2 . iso-2022-cn) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
602 (chinese-big5-1 . chinese-big5) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
603 (chinese-big5-2 . chinese-big5) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
604 (chinese-sisheng . iso-2022-7bit) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
605 (ipa . iso-2022-7bit) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
606 (vietnamese-viscii-lower . vietnamese-viscii) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
607 (vietnamese-viscii-upper . vietnamese-viscii) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
608 (arabic-digit . iso-2022-7bit) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
609 (arabic-1-column . iso-2022-7bit) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
610 (ascii-right-to-left . iso-2022-7bit) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
611 (lao . lao) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
612 (arabic-2-column . iso-2022-7bit) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
613 (indian-is13194 . devanagari) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
614 (indian-1-column . devanagari) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
615 (tibetan-1-column . tibetan) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
616 (ethiopic . iso-2022-jp) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
617 (chinese-cns11643-3 . iso-2022-cn) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
618 (chinese-cns11643-4 . iso-2022-cn) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
619 (chinese-cns11643-5 . iso-2022-cn) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
620 (chinese-cns11643-6 . iso-2022-cn) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
621 (chinese-cns11643-7 . iso-2022-cn) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
622 (indian-2-column . devanagari) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
623 (tibetan . tibetan)))) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
624 (while l |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
625 (put-charset-property (car (car l)) 'prefered-coding-system (cdr (car l))) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
626 (setq l (cdr l)))) |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
627 |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
628 |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
629 ;;; Local Variables: |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
630 ;;; coding: iso-2022-7bit |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
631 ;;; End: |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
632 |
179dbdbc3882
Put `prefered-coding-system'
Kenichi Handa <handa@m17n.org>
parents:
20247
diff
changeset
|
633 ;;; end of characters.el |