aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa1997-05-12 05:30:27 +0000
committerKenichi Handa1997-05-12 05:30:27 +0000
commit9395eb7cf662da57912c74dac4dfd09b4cd411a1 (patch)
tree300cda152c79615993c1e486af810e703dbc94e4
parentb7d7285cd6ad629b55877b7023c926b06ab7fd16 (diff)
downloademacs-9395eb7cf662da57912c74dac4dfd09b4cd411a1.tar.gz
emacs-9395eb7cf662da57912c74dac4dfd09b4cd411a1.zip
Set syntax and category for Devanagari, Thai, and
Tibetan characters. Add a category ?| to the category sets of characters of katakana-jisx0201 and japanese-jisx0212.
-rw-r--r--lisp/international/characters.el80
1 files changed, 80 insertions, 0 deletions
diff --git a/lisp/international/characters.el b/lisp/international/characters.el
index c7ec38e0d30..2462499ee92 100644
--- a/lisp/international/characters.el
+++ b/lisp/international/characters.el
@@ -47,6 +47,7 @@
47(define-category ?v "Vietnamese") 47(define-category ?v "Vietnamese")
48(define-category ?i "Indian") 48(define-category ?i "Indian")
49(define-category ?o "Lao") 49(define-category ?o "Lao")
50(define-category ?q "Tibetan")
50 51
51;; For each group (row) of 2-byte character sets. 52;; For each group (row) of 2-byte character sets.
52 53
@@ -183,6 +184,37 @@
183(modify-syntax-entry ?,Lp(B ".") 184(modify-syntax-entry ?,Lp(B ".")
184(modify-syntax-entry ?,L}(B ".") 185(modify-syntax-entry ?,L}(B ".")
185 186
187;; Devanagari character set
188
189(let ((deflist '(;; chars syntax category
190 ("$(5!!!"!#(B" "w" ?7) ; vowel-modifying diacritical mark
191 ; chandrabindu, anuswar, visarga
192 ("$(5!$(B-$(5!2(B" "w" ?5) ; independent vowel
193 ("$(5!3(B-$(5!X(B" "w" ?0) ; consonant
194 ("$(5!Z(B-$(5!g(B" "w" ?8) ; matra
195 ("$(5!q(B-$(5!z(B" "w" ?6) ; digit
196 ))
197 elm chars len syntax category to ch i)
198 (while deflist
199 (setq elm (car deflist))
200 (setq chars (car elm)
201 len (length chars)
202 syntax (nth 1 elm)
203 category (nth 2 elm)
204 i 0)
205 (while (< i len)
206 (if (= (aref chars i) ?-)
207 (setq i (1+ i)
208 to (sref chars i))
209 (setq ch (sref chars i)
210 to ch))
211 (while (<= ch to)
212 (modify-syntax-entry ch syntax)
213 (modify-category-entry ch category)
214 (setq ch (1+ ch)))
215 (setq i (+ i (char-bytes to))))
216 (setq deflist (cdr deflist))))
217
186;; Ethiopic character set 218;; Ethiopic character set
187 219
188(modify-category-entry (make-char 'ethiopic) ?e) 220(modify-category-entry (make-char 'ethiopic) ?e)
@@ -253,7 +285,9 @@
253(modify-category-entry (make-char 'latin-jisx0201) ?r) 285(modify-category-entry (make-char 'latin-jisx0201) ?r)
254(modify-category-entry (make-char 'japanese-jisx0208) ?j) 286(modify-category-entry (make-char 'japanese-jisx0208) ?j)
255(modify-category-entry (make-char 'japanese-jisx0212) ?j) 287(modify-category-entry (make-char 'japanese-jisx0212) ?j)
288(modify-category-entry (make-char 'katakana-jisx0201) ?\|)
256(modify-category-entry (make-char 'japanese-jisx0208) ?\|) 289(modify-category-entry (make-char 'japanese-jisx0208) ?\|)
290(modify-category-entry (make-char 'japanese-jisx0212) ?\|)
257 291
258;; JISX0208 292;; JISX0208
259(modify-syntax-entry (make-char 'japanese-jisx0208) "w") 293(modify-syntax-entry (make-char 'japanese-jisx0208) "w")
@@ -396,6 +430,52 @@
396 (setq i (+ i (char-bytes to)))) 430 (setq i (+ i (char-bytes to))))
397 (setq deflist (cdr deflist)))) 431 (setq deflist (cdr deflist))))
398 432
433;; Tibetan character set
434
435(let ((row 33))
436 (while (< row 38)
437 (modify-category-entry (make-char 'tibetan row) ?q)
438 (setq row (1+ row))))
439
440(modify-category-entry (make-char 'tibetan-1-column 33) ?q)
441
442(let ((deflist '(;; chars syntax category
443 ("$(7"!(B-$(7"J(B" "w" ?0) ; consonant
444 ("$(7#!(B-$(7#J#P#Q(B" "w" ?0) ;
445 ("$(7$!(B-$(7$e(B" "w" ?0) ;
446 ("$(7%!(B-$(7%u(B" "w" ?0) ;
447 ("$(7"S"["\"]"^"a(B" "w" ?2) ; upper vowel
448 ("$(7"_"c"d"g"h"i"j"k"l(B" "w" ?2) ; upper modifier
449 ("$(7!I"Q"U"e!e!g(B" "w" ?3) ; lowel vowel/modifier
450 ("$(7!P(B-$(7!Y!Z(B-$(7!c(B" "w" ?6) ; digit
451 ("$(7!;!=(B-$(7!B!D"`(B" "." ?|) ; line-break char
452 ("$(8!;!=!?!@!A!D"`(B" "." ?|) ;
453 ("$(7!8!;!=(B-$(7!B!D"`!m!d(B" "." ?>) ; prohibition
454 ("$(8!;!=!?!@!A!D"`(B" "." ?>) ;
455 ("$(7!0(B-$(7!:!l#R#S"f(B" "." ?<) ; prohibition
456 ("$(7!C!E(B-$(7!H!J(B-$(7!O!f!h(B-$(7!k!n!o(B" "." ?q) ; others
457 ))
458 elm chars len syntax category to ch i)
459 (while deflist
460 (setq elm (car deflist))
461 (setq chars (car elm)
462 len (length chars)
463 syntax (nth 1 elm)
464 category (nth 2 elm)
465 i 0)
466 (while (< i len)
467 (if (= (aref chars i) ?-)
468 (setq i (1+ i)
469 to (sref chars i))
470 (setq ch (sref chars i)
471 to ch))
472 (while (<= ch to)
473 (modify-syntax-entry ch syntax)
474 (modify-category-entry ch category)
475 (setq ch (1+ ch)))
476 (setq i (+ i (char-bytes to))))
477 (setq deflist (cdr deflist))))
478
399;; Vietnamese character set 479;; Vietnamese character set
400 480
401(let ((lower (make-char 'vietnamese-viscii-lower)) 481(let ((lower (make-char 'vietnamese-viscii-lower))