]> git.eshelyaron.com Git - emacs.git/commitdiff
Register tibetan-composition-function in
authorKenichi Handa <handa@m17n.org>
Thu, 7 Nov 2002 06:32:49 +0000 (06:32 +0000)
committerKenichi Handa <handa@m17n.org>
Thu, 7 Nov 2002 06:32:49 +0000 (06:32 +0000)
composition-function-table for Tibetan characters.

lisp/language/tibetan.el

index 3a51b709fe2ff4ed633409429191c394547c8879..9ee39ddae872f78607c44ea86c2479ec8d0395f0 100644 (file)
             (sample-text 
              . (tibetan-compose-string
                 (copy-sequence
-"Tibetan (\e4\e$(7"7r'"]\e0"7"]\e1\e4"2\e0"2\e1!;\e4%P\e0"G#!"Q\e1\e4"2\e0"2\e1!;\e(B) \e$(7!4!5!5!>\e4"7\e0"7\e1\e4$P\e0"!#C"Q\e1!;\e4"Er'"S\e0"E"S\e1\e4"G\e0"G\e1!;\e4"7\e0"7\e1\e4"2r'"[\e0"2"[\e1!;\e4"Dr'"[\e0"D"[\e1\e4"#\e0"#\e1\e4"G\e0"G\e1!>\e4"Ir'"]r'"_\e0"I"]"_\e1!;\e4"9\e0"9"Q\e1!;\e4"/r'"S\e0"/"S\e1!;\e4"5\e0"5"Q\e1\e4#2x!#9r'"[\e0"2#9"[\e1!;\e4"Hx!"Rx!"Ur'"c\e0"H"A"U"c\e1!>\e(B")))))
+"Tibetan (\e$(7"7"]"2!;"G#!"Q"2!;\e(B) \e$(7!4!5!5!>"7"!#C"Q!;"E"S"G!;"7"2"[!;"D"["#"G!>"I"]"_!;"9"Q!;"/"S!;"5"Q"2#9"[!;"H"A"U"c!>\e(B")))))
 
 
 ;; `\e$(7"A\e(B' is included in the pattern for subjoined consonants because we
   "[\e$(7"!\e(B-\e$(7"J"K\e(B][\e$(7#!\e(B-\e$(7#J#K#L#M\e(B]*[\e$(7"Q"R"S\e(B-\e$(7"^"a"b"e\e(B]*[\e$(7"_"c"d"g\e(B-\e$(7"l!I!e!g\e(B]*"
   "Regexp matching a composable sequence of Tibetan characters.")
 
-;; Register a function to compose Tibetan characters.
-(set-char-table-range composition-function-table
-                     (cons (decode-char 'tibetan #x2121)
-                           (decode-char 'tibetan #x7E7E))
-                     (list (cons tibetan-composable-pattern
-                                 'tibetan-composition-function)))
-
 ;;;
 ;;; Definitions of conversion data.
 ;;;
     ("\e$(7"G#9\e(B" . "\e$(7%Y\e(B")))
 
 (defconst tibetan-obsolete-glyphs
-  `(("\e$(7!=\e(B" . "\e$(8!=\e(B")                        ; 2 col <-> 1 col
-    ("\e$(7!?\e(B" . "\e$(8!?\e(B")
-    ("\e$(7!@\e(B" . "\e$(8!@\e(B")
-    ("\e$(7!A\e(B" . "\e$(8!A\e(B")
-    ("\e$(7"`\e(B" . "\e$(8"`\e(B")
-    ("\e$(7!;\e(B" . "\e$(8!;\e(B")
-    ("\e$(7!D\e(B" . "\e$(8!D\e(B")
+  `(("\e$(7!=\e(B" . "\e$(7!=\e(B")                        ; 2 col <-> 1 col
+    ("\e$(7!?\e(B" . "\e$(7!?\e(B")
+    ("\e$(7!@\e(B" . "\e$(7!@\e(B")
+    ("\e$(7!A\e(B" . "\e$(7!A\e(B")
+    ("\e$(7"`\e(B" . "\e$(7"`\e(B")
+    ("\e$(7!;\e(B" . "\e$(7!;\e(B")
+    ("\e$(7!D\e(B" . "\e$(7!D\e(B")
     ;; Yes these are dirty. But ...
     ("\e$(7!>\e(B \e$(7!>\e(B" . ,(compose-string "\e$(7!>\e(B \e$(7!>\e(B" 0 3 [?\e$(7!>\e(B (Br . Bl) ?  (Br . Bl) ?\e$(7!>\e(B]))
     ("\e$(7!4!5!5\e(B" . ,(compose-string
@@ -626,6 +619,15 @@ This also matches some punctuation characters which need conversion.")
 (defvar tibetan-decomposed nil)
 (defvar tibetan-decomposed-temp nil)
 
+;; For automatic composition.
+(dolist (range '((?\e$(7#!\e(B . ?\e$(7#J\e(B) "\e$(7#K#L#M"Q"R\e(B" (?\e$(7"S\e(B . ?\e$(7"^\e(B) "\e$(7"a"b"e"_"c"d\e(B" (?\e$(7"g\e(B . ?\e$(7"l\e(B) "\e$(7!I!e!g\e(B"))
+  (if (stringp range)
+      (dotimes (i (length range))
+       (aset composition-function-table (aref range i)
+             'tibetan-composition-function))
+    (set-char-table-range composition-function-table range
+                         'tibetan-composition-function)))
+
 (provide 'tibetan)
 
 ;;; tibetan.el ends here