diff lisp/international/characters.el @ 17753:de6be7f3b904

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.
author Kenichi Handa <handa@m17n.org>
date Mon, 12 May 1997 05:30:27 +0000
parents dc3f449803f6
children 90235db802c7
line wrap: on
line diff
--- a/lisp/international/characters.el	Mon May 12 05:26:35 1997 +0000
+++ b/lisp/international/characters.el	Mon May 12 05:30:27 1997 +0000
@@ -47,6 +47,7 @@
 (define-category ?v "Vietnamese")
 (define-category ?i "Indian")
 (define-category ?o "Lao")
+(define-category ?q "Tibetan")
 
 ;; For each group (row) of 2-byte character sets.
 
@@ -183,6 +184,37 @@
 (modify-syntax-entry ?,Lp(B ".")
 (modify-syntax-entry ?,L}(B ".")
 
+;; Devanagari character set
+
+(let ((deflist	'(;; chars	syntax	category
+		  ("$(5!!!"!#(B"	"w"	?7) ; vowel-modifying diacritical mark
+					    ; chandrabindu, anuswar, visarga
+		  ("$(5!$(B-$(5!2(B"	"w"	?5) ; independent vowel
+		  ("$(5!3(B-$(5!X(B"	"w"	?0) ; consonant
+		  ("$(5!Z(B-$(5!g(B"	"w"	?8) ; matra
+		  ("$(5!q(B-$(5!z(B"	"w"	?6) ; digit
+		  ))
+      elm chars len syntax category to ch i)
+  (while deflist
+    (setq elm (car deflist))
+    (setq chars (car elm)
+	  len (length chars)
+	  syntax (nth 1 elm)
+	  category (nth 2 elm)
+	  i 0)
+    (while (< i len)
+      (if (= (aref chars i) ?-)
+	  (setq i (1+ i)
+		to (sref chars i))
+	(setq ch (sref chars i)
+	      to ch))
+      (while (<= ch to)
+	(modify-syntax-entry ch syntax)
+	(modify-category-entry ch category)
+	(setq ch (1+ ch)))
+      (setq i (+ i (char-bytes to))))
+    (setq deflist (cdr deflist))))
+
 ;; Ethiopic character set
 
 (modify-category-entry (make-char 'ethiopic) ?e)
@@ -253,7 +285,9 @@
 (modify-category-entry (make-char 'latin-jisx0201) ?r)
 (modify-category-entry (make-char 'japanese-jisx0208) ?j)
 (modify-category-entry (make-char 'japanese-jisx0212) ?j)
+(modify-category-entry (make-char 'katakana-jisx0201) ?\|)
 (modify-category-entry (make-char 'japanese-jisx0208) ?\|)
+(modify-category-entry (make-char 'japanese-jisx0212) ?\|)
 
 ;; JISX0208
 (modify-syntax-entry (make-char 'japanese-jisx0208) "w")
@@ -396,6 +430,52 @@
       (setq i (+ i (char-bytes to))))
     (setq deflist (cdr deflist))))
 
+;; Tibetan character set
+
+(let ((row 33))
+  (while (< row 38)
+    (modify-category-entry (make-char 'tibetan row) ?q)
+    (setq row (1+ row))))
+
+(modify-category-entry (make-char 'tibetan-1-column 33) ?q)
+
+(let ((deflist	'(;; chars             syntax category
+		  ("$(7"!(B-$(7"J(B"        	"w"	?0) ; consonant
+		  ("$(7#!(B-$(7#J#P#Q(B"          "w"     ?0) ;
+		  ("$(7$!(B-$(7$e(B"              "w"     ?0) ;
+		  ("$(7%!(B-$(7%u(B"              "w"     ?0) ;
+		  ("$(7"S"["\"]"^"a(B"       "w"	?2) ; upper vowel
+		  ("$(7"_"c"d"g"h"i"j"k"l(B" "w"	?2) ; upper modifier
+		  ("$(7!I"Q"U"e!e!g(B"       "w"	?3) ; lowel vowel/modifier
+		  ("$(7!P(B-$(7!Y!Z(B-$(7!c(B"	        "w"	?6) ; digit
+		  ("$(7!;!=(B-$(7!B!D"`(B"        "."     ?|) ; line-break char
+		  ("$(8!;!=!?!@!A!D"`(B"            "."     ?|) ;
+		  ("$(7!8!;!=(B-$(7!B!D"`!m!d(B"  "."     ?>) ; prohibition
+		  ("$(8!;!=!?!@!A!D"`(B"            "."     ?>) ;
+		  ("$(7!0(B-$(7!:!l#R#S"f(B"      "."     ?<) ; prohibition
+		  ("$(7!C!E(B-$(7!H!J(B-$(7!O!f!h(B-$(7!k!n!o(B" "." ?q) ; others
+		  ))
+      elm chars len syntax category to ch i)
+  (while deflist
+    (setq elm (car deflist))
+    (setq chars (car elm)
+	  len (length chars)
+	  syntax (nth 1 elm)
+	  category (nth 2 elm)
+	  i 0)
+    (while (< i len)
+      (if (= (aref chars i) ?-)
+	  (setq i (1+ i)
+		to (sref chars i))
+	(setq ch (sref chars i)
+	      to ch))
+      (while (<= ch to)
+	(modify-syntax-entry ch syntax)
+	(modify-category-entry ch category)
+	(setq ch (1+ ch)))
+      (setq i (+ i (char-bytes to))))
+    (setq deflist (cdr deflist))))
+
 ;; Vietnamese character set
 
 (let ((lower (make-char 'vietnamese-viscii-lower))