* lisp/newcomment.el (comment-styles): Add autoload.
[emacs.git] / lisp / language / tibetan.el
blob97bc3174d3e57947075c40060caf5c0e8d0504b4
1 ;;; tibetan.el --- support for Tibetan language -*- coding: iso-2022-7bit; -*-
3 ;; Copyright (C) 1997, 2001-2012 Free Software Foundation, Inc.
4 ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
5 ;; 2006, 2007, 2008, 2009, 2010, 2011
6 ;; National Institute of Advanced Industrial Science and Technology (AIST)
7 ;; Registration Number H14PRO021
8 ;; Copyright (C) 2003
9 ;; National Institute of Advanced Industrial Science and Technology (AIST)
10 ;; Registration Number H13PRO009
12 ;; Author: Toru TOMABECHI <Toru.Tomabechi@orient.unil.ch>
13 ;; Created: Feb. 17. 1997
14 ;; Keywords: multilingual, Tibetan, i18n
16 ;; This file is part of GNU Emacs.
18 ;; GNU Emacs is free software: you can redistribute it and/or modify
19 ;; it under the terms of the GNU General Public License as published by
20 ;; the Free Software Foundation, either version 3 of the License, or
21 ;; (at your option) any later version.
23 ;; GNU Emacs is distributed in the hope that it will be useful,
24 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
25 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 ;; GNU General Public License for more details.
28 ;; You should have received a copy of the GNU General Public License
29 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
31 ;;; History:
33 ;; 1997.03.13 Modification for special signs and punctuation.
35 ;;; Commentary:
37 ;;; Code:
39 ;;; Tibetan Character set.
40 ;;; \x2130 -- \x234a is a subset of Unicode v.2 \x0f00 - \x0fb9
41 ;;; with a slight modification. And there are some subjoined
42 ;;; consonants which are not specified in Unicode.
43 ;;; I hope I can add missing characters later.
44 ;;;
45 ;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
46 ;;;2120 // \e$(7!!\e(B \e$(7!"\e(B \e$(7!#\e(B \e$(7!$\e(B \e$(7!%\e(B \e$(7!&\e(B \e$(7!'\e(B \e$(7!(\e(B \e$(7!)\e(B \e$(7!*\e(B \e$(7!+\e(B \e$(7!,\e(B \e$(7!-\e(B \e$(7!.\e(B \e$(7!/\e(B ; obsolete glyphs (2123-5)
47 ;;;2130 \e$(7!0\e(B \e$(7!1\e(B \e$(7!2\e(B \e$(7!3\e(B \e$(7!4\e(B \e$(7!5\e(B \e$(7!6\e(B \e$(7!7\e(B \e$(7!8\e(B \e$(7!9\e(B \e$(7!:\e(B \e$(7!;\e(B \e$(7!<\e(B \e$(7!=\e(B \e$(7!>\e(B \e$(7!?\e(B ; Punctuation,
48 ;;;2140 \e$(7!@\e(B \e$(7!A\e(B \e$(7!B\e(B \e$(7!C\e(B \e$(7!D\e(B \e$(7!E\e(B \e$(7!F\e(B \e$(7!G\e(B \e$(7!H\e(B \e$(7!I\e(B \e$(7!J\e(B \e$(7!K\e(B \e$(7!L\e(B \e$(7!M\e(B \e$(7!N\e(B \e$(7!O\e(B ; Digits and
49 ;;;2150 \e$(7!P\e(B \e$(7!Q\e(B \e$(7!R\e(B \e$(7!S\e(B \e$(7!T\e(B \e$(7!U\e(B \e$(7!V\e(B \e$(7!W\e(B \e$(7!X\e(B \e$(7!Y\e(B \e$(7!Z\e(B \e$(7![\e(B \e$(7!\\e(B \e$(7!]\e(B \e$(7!^\e(B \e$(7!_\e(B ; Special signs.
50 ;;;2160 \e$(7!`\e(B \e$(7!a\e(B \e$(7!b\e(B \e$(7!c\e(B \e$(7!d\e(B \e$(7!e\e(B \e$(7!f\e(B \e$(7!g\e(B \e$(7!h\e(B \e$(7!i\e(B \e$(7!j\e(B \e$(7!k\e(B \e$(7!l\e(B \e$(7!m\e(B \e$(7!n\e(B \e$(7!o\e(B ;
51 ;;;2170 \e$(7!p\e(B \e$(7!q\e(B \e$(7!r\e(B \e$(7!s\e(B \e$(7!t\e(B \e$(7!u\e(B \e$(7!v\e(B \e$(7!w\e(B \e$(7!x\e(B \e$(7!y\e(B \e$(7!z\e(B \e$(7!{\e(B \e$(7!|\e(B \e$(7!}\e(B \e$(7!~\e(B // ;
52 ;;;
53 ;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
54 ;;;2220 // \e$(7"!\e(B \e$(7""\e(B \e$(7"#\e(B \e$(7"$\e(B \e$(7"%\e(B \e$(7"&\e(B \e$(7"'\e(B \e$(7"(\e(B \e$(7")\e(B \e$(7"*\e(B \e$(7"+\e(B \e$(7",\e(B \e$(7"-\e(B \e$(7".\e(B \e$(7"/\e(B ; Base consonants
55 ;;;2230 \e$(7"0\e(B \e$(7"1\e(B \e$(7"2\e(B \e$(7"3\e(B \e$(7"4\e(B \e$(7"5\e(B \e$(7"6\e(B \e$(7"7\e(B \e$(7"8\e(B \e$(7"9\e(B \e$(7":\e(B \e$(7";\e(B \e$(7"<\e(B \e$(7"=\e(B \e$(7">\e(B \e$(7"?\e(B ; and
56 ;;;2240 \e$(7"@\e(B \e$(7"A\e(B \e$(7"B\e(B \e$(7"C\e(B \e$(7"D\e(B \e$(7"E\e(B \e$(7"F\e(B \e$(7"G\e(B \e$(7"H\e(B \e$(7"I\e(B \e$(7"J\e(B \e$(7"K\e(B \e$(7"L\e(B \e$(7"M\e(B \e$(7"N\e(B \e$(7"O\e(B ; Vowel signs.
57 ;;;2250 \e$(7"P\e(B \e$(7"Q\e(B \e$(7"R\e(B \e$(7"S\e(B \e$(7"T\e(B \e$(7"U\e(B \e$(7"V\e(B \e$(7"W\e(B \e$(7"X\e(B \e$(7"Y\e(B \e$(7"Z\e(B \e$(7"[\e(B \e$(7"\\e(B \e$(7"]\e(B \e$(7"^\e(B \e$(7"_\e(B ; (\x2251 = vowel a)
58 ;;;2260 \e$(7"`\e(B \e$(7"a\e(B \e$(7"b\e(B \e$(7"c\e(B \e$(7"d\e(B \e$(7"e\e(B \e$(7"f\e(B \e$(7"g\e(B \e$(7"h\e(B \e$(7"i\e(B \e$(7"j\e(B \e$(7"k\e(B \e$(7"l\e(B \e$(7"m\e(B \e$(7"n\e(B \e$(7"o\e(B ; Long vowels and
59 ;;;2270 \e$(7"p\e(B \e$(7"q\e(B \e$(7"r\e(B \e$(7"s\e(B \e$(7"t\e(B \e$(7"u\e(B \e$(7"v\e(B \e$(7"w\e(B \e$(7"x\e(B \e$(7"y\e(B \e$(7"z\e(B \e$(7"{\e(B \e$(7"|\e(B \e$(7"}\e(B \e$(7"~\e(B // ; vocalic r, l ARE
60 ;;; ; atomically
61 ;;; ; encoded.
62 ;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
63 ;;;2320 // \e$(7#!\e(B \e$(7#"\e(B \e$(7##\e(B \e$(7#$\e(B \e$(7#%\e(B \e$(7#&\e(B \e$(7#'\e(B \e$(7#(\e(B \e$(7#)\e(B \e$(7#*\e(B \e$(7#+\e(B \e$(7#,\e(B \e$(7#-\e(B \e$(7#.\e(B \e$(7#/\e(B ; Subjoined consonants
64 ;;;2330 \e$(7#0\e(B \e$(7#1\e(B \e$(7#2\e(B \e$(7#3\e(B \e$(7#4\e(B \e$(7#5\e(B \e$(7#6\e(B \e$(7#7\e(B \e$(7#8\e(B \e$(7#9\e(B \e$(7#:\e(B \e$(7#;\e(B \e$(7#<\e(B \e$(7#=\e(B \e$(7#>\e(B \e$(7#?\e(B ;
65 ;;;2340 \e$(7#@\e(B \e$(7#A\e(B \e$(7#B\e(B \e$(7#C\e(B \e$(7#D\e(B \e$(7#E\e(B \e$(7#F\e(B \e$(7#G\e(B \e$(7#H\e(B \e$(7#I\e(B \e$(7#J\e(B \e$(7#K\e(B \e$(7#L\e(B \e$(7#M\e(B \e$(7#N\e(B \e$(7#O\e(B ;
66 ;;;2350 \e$(7#P\e(B \e$(7#Q\e(B \e$(7#R\e(B \e$(7#S\e(B \e$(7#T\e(B \e$(7#U\e(B \e$(7#V\e(B \e$(7#W\e(B \e$(7#X\e(B \e$(7#Y\e(B \e$(7#Z\e(B \e$(7#[\e(B \e$(7#\\e(B \e$(7#]\e(B \e$(7#^\e(B \e$(7#_\e(B ; Hereafter, the chars
67 ;;;2360 \e$(7#`\e(B \e$(7#a\e(B \e$(7#b\e(B \e$(7#c\e(B \e$(7#d\e(B \e$(7#e\e(B \e$(7#f\e(B \e$(7#g\e(B \e$(7#h\e(B \e$(7#i\e(B \e$(7#j\e(B \e$(7#k\e(B \e$(7#l\e(B \e$(7#m\e(B \e$(7#n\e(B \e$(7#o\e(B ; are not specified
68 ;;;2370 \e$(7#p\e(B \e$(7#q\e(B \e$(7#r\e(B \e$(7#s\e(B \e$(7#t\e(B \e$(7#u\e(B \e$(7#v\e(B \e$(7#w\e(B \e$(7#x\e(B \e$(7#y\e(B \e$(7#z\e(B \e$(7#{\e(B \e$(7#|\e(B \e$(7#}\e(B \e$(7#~\e(B // ; in Unicode.
69 ;;;
70 ;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
71 ;;;2420 // \e$(7$!\e(B \e$(7$"\e(B \e$(7$#\e(B \e$(7$$\e(B \e$(7$%\e(B \e$(7$&\e(B \e$(7$'\e(B \e$(7$(\e(B \e$(7$)\e(B \e$(7$*\e(B \e$(7$+\e(B \e$(7$,\e(B \e$(7$-\e(B \e$(7$.\e(B \e$(7$/\e(B ; Precomposed
72 ;;;2430 \e$(7$0\e(B \e$(7$1\e(B \e$(7$2\e(B \e$(7$3\e(B \e$(7$4\e(B \e$(7$5\e(B \e$(7$6\e(B \e$(7$7\e(B \e$(7$8\e(B \e$(7$9\e(B \e$(7$:\e(B \e$(7$;\e(B \e$(7$<\e(B \e$(7$=\e(B \e$(7$>\e(B \e$(7$?\e(B ; consonants for
73 ;;;2440 \e$(7$@\e(B \e$(7$A\e(B \e$(7$B\e(B \e$(7$C\e(B \e$(7$D\e(B \e$(7$E\e(B \e$(7$F\e(B \e$(7$G\e(B \e$(7$H\e(B \e$(7$I\e(B \e$(7$J\e(B \e$(7$K\e(B \e$(7$L\e(B \e$(7$M\e(B \e$(7$N\e(B \e$(7$O\e(B ; ordinary Tibetan.
74 ;;;2450 \e$(7$P\e(B \e$(7$Q\e(B \e$(7$R\e(B \e$(7$S\e(B \e$(7$T\e(B \e$(7$U\e(B \e$(7$V\e(B \e$(7$W\e(B \e$(7$X\e(B \e$(7$Y\e(B \e$(7$Z\e(B \e$(7$[\e(B \e$(7$\\e(B \e$(7$]\e(B \e$(7$^\e(B \e$(7$_\e(B ; They are decomposed
75 ;;;2460 \e$(7$`\e(B \e$(7$a\e(B \e$(7$b\e(B \e$(7$c\e(B \e$(7$d\e(B \e$(7$e\e(B \e$(7$f\e(B \e$(7$g\e(B \e$(7$h\e(B \e$(7$i\e(B \e$(7$j\e(B \e$(7$k\e(B \e$(7$l\e(B \e$(7$m\e(B \e$(7$n\e(B \e$(7$o\e(B ; into base and
76 ;;;2470 \e$(7$p\e(B \e$(7$q\e(B \e$(7$r\e(B \e$(7$s\e(B \e$(7$t\e(B \e$(7$u\e(B \e$(7$v\e(B \e$(7$w\e(B \e$(7$x\e(B \e$(7$y\e(B \e$(7$z\e(B \e$(7${\e(B \e$(7$|\e(B \e$(7$}\e(B \e$(7$~\e(B // ; subjoined consonants
77 ;;; ; when written on a
78 ;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F ; file in Tibetan
79 ;;;2520 // \e$(7%!\e(B \e$(7%"\e(B \e$(7%#\e(B \e$(7%$\e(B \e$(7%%\e(B \e$(7%&\e(B \e$(7%'\e(B \e$(7%(\e(B \e$(7%)\e(B \e$(7%*\e(B \e$(7%+\e(B \e$(7%,\e(B \e$(7%-\e(B \e$(7%.\e(B \e$(7%/\e(B ; coding system.
80 ;;;2530 \e$(7%0\e(B \e$(7%1\e(B \e$(7%2\e(B \e$(7%3\e(B \e$(7%4\e(B \e$(7%5\e(B \e$(7%6\e(B \e$(7%7\e(B \e$(7%8\e(B \e$(7%9\e(B \e$(7%:\e(B \e$(7%;\e(B \e$(7%<\e(B \e$(7%=\e(B \e$(7%>\e(B \e$(7%?\e(B ;
81 ;;;2540 \e$(7%@\e(B \e$(7%A\e(B \e$(7%B\e(B \e$(7%C\e(B \e$(7%D\e(B \e$(7%E\e(B \e$(7%F\e(B \e$(7%G\e(B \e$(7%H\e(B \e$(7%I\e(B \e$(7%J\e(B \e$(7%K\e(B \e$(7%L\e(B \e$(7%M\e(B \e$(7%N\e(B \e$(7%O\e(B ;
82 ;;;2550 \e$(7%P\e(B \e$(7%Q\e(B \e$(7%R\e(B \e$(7%S\e(B \e$(7%T\e(B \e$(7%U\e(B \e$(7%V\e(B \e$(7%W\e(B \e$(7%X\e(B \e$(7%Y\e(B \e$(7%Z\e(B \e$(7%[\e(B \e$(7%\\e(B \e$(7%]\e(B \e$(7%^\e(B \e$(7%_\e(B ;
83 ;;;2560 \e$(7%`\e(B \e$(7%a\e(B \e$(7%b\e(B \e$(7%c\e(B \e$(7%d\e(B \e$(7%e\e(B \e$(7%f\e(B \e$(7%g\e(B \e$(7%h\e(B \e$(7%i\e(B \e$(7%j\e(B \e$(7%k\e(B \e$(7%l\e(B \e$(7%m\e(B \e$(7%n\e(B \e$(7%o\e(B ;
84 ;;;2570 \e$(7%p\e(B \e$(7%q\e(B \e$(7%r\e(B \e$(7%s\e(B \e$(7%t\e(B \e$(7%u\e(B \e$(7%v\e(B \e$(7%w\e(B \e$(7%x\e(B \e$(7%y\e(B \e$(7%z\e(B \e$(7%{\e(B \e$(7%|\e(B \e$(7%}\e(B \e$(7%~\e(B // ;
85 ;;;
88 (define-coding-system 'tibetan-iso-8bit
89 "8-bit encoding for ASCII (MSB=0) and TIBETAN (MSB=1)."
90 :coding-type 'iso-2022
91 :mnemonic ?Q
92 :designation [ascii tibetan nil nil]
93 :charset-list '(ascii tibetan))
95 (define-coding-system-alias 'tibetan 'tibetan-iso-8bit)
97 (set-language-info-alist
98 "Tibetan" '((charset tibetan tibetan-1-column)
99 (coding-system tibetan-iso-8bit)
100 (coding-priority iso-2022-7bit tibetan-iso-8bit)
101 (input-method . "tibetan-wylie")
102 (features tibet-util)
103 (documentation . t)
104 (sample-text . "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")))
106 ;; `\e$(7"A\e(B' is included in the pattern for subjoined consonants because we
107 ;; treat it specially in tibetan-add-components.
108 ;; modified by Tomabechi 1999/12/10
109 ;; modified by Tomabechi 2000/06/08
110 ;; To allow infinite addition of vowels/modifiers
111 ;; as specified in Unicode v.3
112 ;; \e$(7"A\e(B is removed from the class of subjoined. Tomabechi 2000/06/08
113 ;; (for Unicode support)
114 (defconst tibetan-composable-pattern
115 "[\e$(7"!\e(B-\e$(7"J"K\e(B][\e$(7#!\e(B-\e$(7#J#K#L#M\e(B]*[\e$,1FP\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]*"
116 "Regexp matching a composable sequence of Tibetan characters.")
119 ;;; Definitions of conversion data.
123 ;;; alists for tibetan char <-> transcription conversion
124 ;;; longer transcription should come first
125 (defconst tibetan-consonant-transcription-alist
126 '(("tsh" . "\e$(7";\e(B")
127 ("dzh" . "\e$(7"=\e(B")
128 ("kSH" . "\e$(7"J\e(B")
129 ("kh" . "\e$(7""\e(B")
130 ("gh" . "\e$(7"$\e(B")
131 ("ng" . "\e$(7"%\e(B")
132 ("ch" . "\e$(7"'\e(B")
133 ("ny" . "\e$(7"*\e(B")
134 ("TH" . "\e$(7",\e(B")
135 ("DH" . "\e$(7".\e(B")
136 ("th" . "\e$(7"1\e(B")
137 ("dh" . "\e$(7"3\e(B")
138 ("ph" . "\e$(7"6\e(B")
139 ("bh" . "\e$(7"8\e(B")
140 ("ts" . "\e$(7":\e(B")
141 ("dz" . "\e$(7"<\e(B")
142 ("zh" . "\e$(7"?\e(B")
143 ("sh" . "\e$(7"E\e(B")
144 ("SH" . "\e$(7"F\e(B")
145 ("k" . "\e$(7"!\e(B")
146 ("g" . "\e$(7"#\e(B")
147 ("c" . "\e$(7"&\e(B")
148 ("j" . "\e$(7"(\e(B")
149 ("T" . "\e$(7"+\e(B")
150 ("D" . "\e$(7"-\e(B")
151 ("N" . "\e$(7"/\e(B")
152 ("t" . "\e$(7"0\e(B")
153 ("d" . "\e$(7"2\e(B")
154 ("n" . "\e$(7"4\e(B")
155 ("p" . "\e$(7"5\e(B")
156 ("b" . "\e$(7"7\e(B")
157 ("m" . "\e$(7"9\e(B")
158 ("w" . "\e$(7">\e(B")
159 ("z" . "\e$(7"@\e(B")
160 ("'" . "\e$(7"A\e(B")
161 ("y" . "\e$(7"B\e(B")
162 ("r" . "\e$(7"C\e(B")
163 ("l" . "\e$(7"D\e(B")
164 ("s" . "\e$(7"G\e(B")
165 ("h" . "\e$(7"H\e(B")
166 ("H" . "\e$(7"H\e(B")
167 ("A" . "\e$(7"I\e(B")
168 ;; Added by Tomabechi 1999/12/10
169 ("R" . "\e$(7"K\e(B") ;; fixed form RA
173 (defconst tibetan-vowel-transcription-alist
175 ;; Composite Vowels
176 ;; Added by Tomabechi 2000/06/08
177 ("frr" . "\e$(7"X\e(B")
178 ("fll" . "\e$(7"Z\e(B")
179 ("fa" . "\e$(7"R\e(B")
180 ("fi" . "\e$(7"T\e(B")
181 ("fu" . "\e$(7"V\e(B")
182 ("fr" . "\e$(7"W\e(B")
183 ("fl" . "\e$(7"Y\e(B")
184 ("fI" . "\e$(7"b\e(B")
185 ;; Normal Vowels
186 ("ai" . "\e$(7"\\e(B")
187 ("au" . "\e$(7"^\e(B")
188 ("ee" . "\e$(7"\\e(B")
189 ("oo" . "\e$(7"^\e(B")
190 ("a" . "\e$(7"Q\e(B") ; invisible vowel sign (\x2251)
191 ("i" . "\e$(7"S\e(B")
192 ("u" . "\e$(7"U\e(B")
193 ("e" . "\e$(7"[\e(B")
194 ("o" . "\e$(7"]\e(B")
195 ("E" . "\e$(7"\\e(B")
196 ("O" . "\e$(7"^\e(B")
197 ("I" . "\e$(7"a\e(B")
198 ("," . "\e$(7"e\e(B") ; idem.
201 (defconst tibetan-modifier-transcription-alist
202 '(("M" . "\e$(7"_\e(B")
203 ("~" . "\e$(7"c\e(B")
204 ("`" . "\e$(7"d\e(B")
205 ("x" . "\e$(7"i\e(B")
206 ("X" . "\e$(7"j\e(B")
207 ("v" . "\e$(7"g\e(B")
208 ("V" . "\e$(7"h\e(B")
209 ("q" . "\e$(7"k\e(B")
210 ("Q" . "\e$(7"l\e(B")
211 ("_/" . "\e$(7!I\e(B")
212 ("_o" . "\e$(7!g\e(B")
213 ("_O" . "\e$(7!e\e(B")))
215 (defconst tibetan-precomposed-transcription-alist
216 '(("phyw" . "\e$(7$G\e(B")
217 ("tshw" . "\e$(7$)\e(B")
218 ("rtsw" . "\e$(7%.\e(B")
219 ("khw" . "\e$(7$"\e(B")
220 ("nyw" . "\e$(7$%\e(B")
221 ("tsw" . "\e$(7$(\e(B")
222 ("zhw" . "\e$(7$*\e(B")
223 ("shw" . "\e$(7$.\e(B")
224 ("khy" . "\e$(7$A\e(B")
225 ("phy" . "\e$(7$D\e(B")
226 ("khr" . "\e$(7$Q\e(B")
227 ("thr" . "\e$(7$T\e(B")
228 ("phr" . "\e$(7$W\e(B")
229 ("shr" . "\e$(7$Z\e(B")
230 ("dzr" . "\e$(7$^\e(B")
231 ("grw" . "\e$(7$_\e(B")
232 ("rng" . "\e$(7%#\e(B")
233 ("rny" . "\e$(7%%\e(B")
234 ("rts" . "\e$(7%+\e(B")
235 ("rdz" . "\e$(7%,\e(B")
236 ("rgw" . "\e$(7%-\e(B")
237 ("rky" . "\e$(7%0\e(B")
238 ("rgy" . "\e$(7%1\e(B")
239 ("rmy" . "\e$(7%2\e(B")
240 ("lng" . "\e$(7%B\e(B")
241 ("sng" . "\e$(7%R\e(B")
242 ("sny" . "\e$(7%S\e(B")
243 ("sts" . "\e$(7%Z\e(B")
244 ("sky" . "\e$(7%`\e(B")
245 ("sgy" . "\e$(7%a\e(B")
246 ("spy" . "\e$(7%b\e(B")
247 ("sby" . "\e$(7%c\e(B")
248 ("smy" . "\e$(7%d\e(B")
249 ("skr" . "\e$(7%p\e(B")
250 ("sgr" . "\e$(7%q\e(B")
251 ("snr" . "\e$(7%r\e(B")
252 ("spr" . "\e$(7%s\e(B")
253 ("sbr" . "\e$(7%t\e(B")
254 ("smr" . "\e$(7%u\e(B")
255 ("kw" . "\e$(7$!\e(B")
256 ("gw" . "\e$(7$#\e(B")
257 ("cw" . "\e$(7$$\e(B")
258 ("tw" . "\e$(7$&\e(B")
259 ("dw" . "\e$(7$'\e(B")
260 ("zw" . "\e$(7$+\e(B")
261 ("rw" . "\e$(7$,\e(B")
262 ("lw" . "\e$(7$-\e(B")
263 ("sw" . "\e$(7$/\e(B")
264 ("hw" . "\e$(7$0\e(B")
265 ("ky" . "\e$(7$@\e(B")
266 ("gy" . "\e$(7$B\e(B")
267 ("py" . "\e$(7$C\e(B")
268 ("by" . "\e$(7$E\e(B")
269 ("my" . "\e$(7$F\e(B")
270 ("kr" . "\e$(7$P\e(B")
271 ("gr" . "\e$(7$R\e(B")
272 ("tr" . "\e$(7$S\e(B")
273 ("dr" . "\e$(7$U\e(B")
274 ("pr" . "\e$(7$V\e(B")
275 ("brk" . "\e$(7"7%!\e(B")
276 ("brg" . "\e$(7"7%"\e(B")
277 ("brng" . "\e$(7"7%#\e(B")
278 ("brj" . "\e$(7"7%$\e(B")
279 ("brny" . "\e$(7"7%%\e(B")
280 ("brt" . "\e$(7"7%&\e(B")
281 ("brd" . "\e$(7"7%'\e(B")
282 ("brn" . "\e$(7"7%(\e(B")
283 ("brts" . "\e$(7"7%+\e(B")
284 ("brdz" . "\e$(7"7%,\e(B")
285 ("brl" . "\e$(7"7$d\e(B")
286 ("br" . "\e$(7$X\e(B")
287 ("mr" . "\e$(7$Y\e(B")
288 ("sr" . "\e$(7$[\e(B")
289 ("hr" . "\e$(7$\\e(B")
290 ("jr" . "\e$(7$]\e(B")
291 ("kl" . "\e$(7$`\e(B")
292 ("gl" . "\e$(7$a\e(B")
293 ("blt" . "\e$(7"7%E\e(B")
294 ("bld" . "\e$(7"7%F\e(B")
295 ("bl" . "\e$(7$b\e(B")
296 ("zl" . "\e$(7$c\e(B")
297 ("rl" . "\e$(7$d\e(B")
298 ("sl" . "\e$(7$e\e(B")
299 ("rk" . "\e$(7%!\e(B")
300 ("rg" . "\e$(7%"\e(B")
301 ("rj" . "\e$(7%$\e(B")
302 ("rt" . "\e$(7%&\e(B")
303 ("rd" . "\e$(7%'\e(B")
304 ("rn" . "\e$(7%(\e(B")
305 ("rb" . "\e$(7%)\e(B")
306 ("rm" . "\e$(7%*\e(B")
307 ("lk" . "\e$(7%@\e(B")
308 ("lg" . "\e$(7%A\e(B")
309 ("lc" . "\e$(7%C\e(B")
310 ("lj" . "\e$(7%D\e(B")
311 ("lt" . "\e$(7%E\e(B")
312 ("ld" . "\e$(7%F\e(B")
313 ("ln" . "\e$(7!!\e(B") ; dummy \x2121
314 ("lp" . "\e$(7%G\e(B")
315 ("lb" . "\e$(7%H\e(B")
316 ("lh" . "\e$(7%I\e(B")
317 ("sk" . "\e$(7%P\e(B")
318 ("sg" . "\e$(7%Q\e(B")
319 ("st" . "\e$(7%T\e(B")
320 ("sd" . "\e$(7%U\e(B")
321 ("sn" . "\e$(7%V\e(B")
322 ("sp" . "\e$(7%W\e(B")
323 ("sb" . "\e$(7%X\e(B")
324 ("sm" . "\e$(7%Y\e(B"))
328 (defconst tibetan-subjoined-transcription-alist
329 (sort '(("+k" . "\e$(7#!\e(B")
330 ("+kh" . "\e$(7#"\e(B")
331 ("+g" . "\e$(7##\e(B")
332 ("+gh" . "\e$(7#$\e(B")
333 ("+ng" . "\e$(7#%\e(B")
334 ("+c" . "\e$(7#&\e(B")
335 ("+ch" . "\e$(7#'\e(B")
336 ("+j" . "\e$(7#(\e(B")
337 ("+ny" . "\e$(7#*\e(B")
338 ("+T" . "\e$(7#+\e(B")
339 ("+TH" . "\e$(7#,\e(B")
340 ("+D" . "\e$(7#-\e(B")
341 ("+DH" . "\e$(7#.\e(B")
342 ("+N" . "\e$(7#/\e(B")
343 ("+t" . "\e$(7#0\e(B")
344 ("+th" . "\e$(7#1\e(B")
345 ("+d" . "\e$(7#2\e(B")
346 ("+dh" . "\e$(7#3\e(B")
347 ("+n" . "\e$(7#4\e(B")
348 ("+p" . "\e$(7#5\e(B")
349 ("+ph" . "\e$(7#6\e(B")
350 ("+b" . "\e$(7#7\e(B")
351 ("+bh" . "\e$(7#8\e(B")
352 ("+m" . "\e$(7#9\e(B")
353 ("+ts" . "\e$(7#:\e(B")
354 ("+tsh" . "\e$(7#;\e(B")
355 ("+dz" . "\e$(7#<\e(B")
356 ("+dzh" . "\e$(7#=\e(B")
357 ("+w" . "\e$(7#>\e(B")
358 ("+zh" . "\e$(7#?\e(B")
359 ("+z" . "\e$(7#@\e(B")
360 ("+'" . "\e$(7#A\e(B")
361 ("+y" . "\e$(7#B\e(B")
362 ("+r" . "\e$(7#C\e(B")
363 ("+l" . "\e$(7#D\e(B")
364 ("+sh" . "\e$(7#E\e(B")
365 ("+SH" . "\e$(7#F\e(B")
366 ("+s" . "\e$(7#G\e(B")
367 ("+h" . "\e$(7#H\e(B")
368 ("+A" . "\e$(7#I\e(B")
369 ("+kSH" . "\e$(7#J\e(B")
370 ;; Added by Tomabechi 1999/12/10
371 ("+W" . "\e$(7#K\e(B") ;; fixed form subscribed WA
372 ("+Y" . "\e$(7#L\e(B") ;; fixed form subscribed YA
373 ("+R" . "\e$(7#M\e(B") ;; fixed form subscribed RA
375 (lambda (x y) (> (length (car x)) (length (car y))))))
378 ;;; alist for Tibetan base consonant <-> subjoined consonant conversion.
380 (defconst tibetan-base-to-subjoined-alist
381 '(("\e$(7"!\e(B" . "\e$(7#!\e(B")
382 ("\e$(7""\e(B" . "\e$(7#"\e(B")
383 ("\e$(7"#\e(B" . "\e$(7##\e(B")
384 ("\e$(7"$\e(B" . "\e$(7#$\e(B")
385 ("\e$(7"%\e(B" . "\e$(7#%\e(B")
386 ("\e$(7"&\e(B" . "\e$(7#&\e(B")
387 ("\e$(7"'\e(B" . "\e$(7#'\e(B")
388 ("\e$(7"(\e(B" . "\e$(7#(\e(B")
389 ("\e$(7"*\e(B" . "\e$(7#*\e(B")
390 ("\e$(7"+\e(B" . "\e$(7#+\e(B")
391 ("\e$(7",\e(B" . "\e$(7#,\e(B")
392 ("\e$(7"-\e(B" . "\e$(7#-\e(B")
393 ("\e$(7".\e(B" . "\e$(7#.\e(B")
394 ("\e$(7"/\e(B" . "\e$(7#/\e(B")
395 ("\e$(7"0\e(B" . "\e$(7#0\e(B")
396 ("\e$(7"1\e(B" . "\e$(7#1\e(B")
397 ("\e$(7"2\e(B" . "\e$(7#2\e(B")
398 ("\e$(7"3\e(B" . "\e$(7#3\e(B")
399 ("\e$(7"4\e(B" . "\e$(7#4\e(B")
400 ("\e$(7"5\e(B" . "\e$(7#5\e(B")
401 ("\e$(7"6\e(B" . "\e$(7#6\e(B")
402 ("\e$(7"7\e(B" . "\e$(7#7\e(B")
403 ("\e$(7"8\e(B" . "\e$(7#8\e(B")
404 ("\e$(7"9\e(B" . "\e$(7#9\e(B")
405 ("\e$(7":\e(B" . "\e$(7#:\e(B")
406 ("\e$(7";\e(B" . "\e$(7#;\e(B")
407 ("\e$(7"<\e(B" . "\e$(7#<\e(B")
408 ("\e$(7"=\e(B" . "\e$(7#=\e(B")
409 ("\e$(7">\e(B" . "\e$(7#>\e(B")
410 ("\e$(7"?\e(B" . "\e$(7#?\e(B")
411 ("\e$(7"@\e(B" . "\e$(7#@\e(B")
412 ("\e$(7"A\e(B" . "\e$(7#A\e(B")
413 ("\e$(7"B\e(B" . "\e$(7#B\e(B")
414 ("\e$(7"C\e(B" . "\e$(7#C\e(B")
415 ("\e$(7"D\e(B" . "\e$(7#D\e(B")
416 ("\e$(7"E\e(B" . "\e$(7#E\e(B")
417 ("\e$(7"F\e(B" . "\e$(7#F\e(B")
418 ("\e$(7"G\e(B" . "\e$(7#G\e(B")
419 ("\e$(7"H\e(B" . "\e$(7#H\e(B")
420 ("\e$(7"I\e(B" . "\e$(7#I\e(B")
421 ("\e$(7"J\e(B" . "\e$(7#J\e(B")
422 ;; Added by Tomabechi 1999/12/10
423 ("\e$(7"K\e(B" . "\e$(7#M\e(B") ;; Fixed form RA (224B->234D)
426 ;;; alist for Tibetan composite vowels (long i, vocalic r, etc.)
427 ;;; New variable. created by Tomabechi 2000/06/08
428 (defconst tibetan-composite-vowel-alist
429 '(;; LONG A
430 ;; ("\e$(7"R\e(B" . ((bc . tc) ?\e$(7"R\e(B))
431 ;; LONG I
432 ("\e$(7"T\e(B" . (?\e$(7"R\e(B (tc . bc) ?\e$(7"S\e(B))
433 ;; LONG U
434 ("\e$(7"V\e(B" . (?\e$(7"R\e(B (bc . tc) ?\e$(7"U\e(B))
435 ;; VOCALIC R
436 ("\e$(7"W\e(B" . (?\e$(7#C\e(B (tc . bc) ?\e$(7"a\e(B))
437 ;; LONG VOCALIC R
438 ("\e$(7"X\e(B" . (?\e$(7#C\e(B (bc . tc) ?\e$(7"R\e(B (tc . bc) ?\e$(7"a\e(B))
439 ;; VOCALIC L
440 ("\e$(7"Y\e(B" . (?\e$(7#D\e(B (tc . bc) ?\e$(7"a\e(B))
441 ;;\e$(7!;\e(BLONG VOCALIC L
442 ("\e$(7"Z\e(B" . (?\e$(7#D\e(B (bc . tc) ?\e$(7"R\e(B (tc . bc) ?\e$(7"a\e(B))
443 ;; LONG REVERSE I
444 ("\e$(7"b\e(B" . (?\e$(7"R\e(B (tc . bc) ?\e$(7"a\e(B))
450 ;;; alist for Tibetan consonantic components <-> precomposed glyph conversion.
451 ;;; (includes some punctuation conversion rules)
453 (defconst tibetan-precomposition-rule-alist
454 `(("\e$(7"6#B#>\e(B" . "\e$(7$G\e(B")
455 ("\e$(7"##C#>\e(B" . "\e$(7$_\e(B")
456 ("\e$(7";#>\e(B" . "\e$(7$)\e(B")
457 ("\e$(7"C#:#>\e(B" . "\e$(7%.\e(B")
458 ("\e$(7"C###>\e(B" . "\e$(7%-\e(B")
459 ("\e$(7"C#!#B\e(B" . "\e$(7%0\e(B")
460 ("\e$(7"C###B\e(B" . "\e$(7%1\e(B")
461 ("\e$(7"C#9#B\e(B" . "\e$(7%2\e(B")
462 ("\e$(7"G#!#B\e(B" . "\e$(7%`\e(B")
463 ("\e$(7"G###B\e(B" . "\e$(7%a\e(B")
464 ("\e$(7"G#5#B\e(B" . "\e$(7%b\e(B")
465 ("\e$(7"G#7#B\e(B" . "\e$(7%c\e(B")
466 ("\e$(7"G#9#B\e(B" . "\e$(7%d\e(B")
467 ("\e$(7"G#!#C\e(B" . "\e$(7%p\e(B")
468 ("\e$(7"G###C\e(B" . "\e$(7%q\e(B")
469 ("\e$(7"G#4#C\e(B" . "\e$(7%r\e(B")
470 ("\e$(7"G#5#C\e(B" . "\e$(7%s\e(B")
471 ("\e$(7"G#7#C\e(B" . "\e$(7%t\e(B")
472 ("\e$(7"G#9#C\e(B" . "\e$(7%u\e(B")
473 ("\e$(7""#>\e(B" . "\e$(7$"\e(B")
474 ("\e$(7"*#>\e(B" . "\e$(7$%\e(B")
475 ("\e$(7":#>\e(B" . "\e$(7$(\e(B")
476 ("\e$(7"?#>\e(B" . "\e$(7$*\e(B")
477 ("\e$(7"E#>\e(B" . "\e$(7$.\e(B")
478 ("\e$(7""#B\e(B" . "\e$(7$A\e(B")
479 ("\e$(7"6#B\e(B" . "\e$(7$D\e(B")
480 ("\e$(7""#C\e(B" . "\e$(7$Q\e(B")
481 ("\e$(7"1#C\e(B" . "\e$(7$T\e(B")
482 ("\e$(7"6#C\e(B" . "\e$(7$W\e(B")
483 ("\e$(7"E#C\e(B" . "\e$(7$Z\e(B")
484 ("\e$(7"<#C\e(B" . "\e$(7$^\e(B")
485 ("\e$(7"C#%\e(B" . "\e$(7%#\e(B")
486 ("\e$(7"C#*\e(B" . "\e$(7%%\e(B")
487 ("\e$(7"C#:\e(B" . "\e$(7%+\e(B")
488 ("\e$(7"C#<\e(B" . "\e$(7%,\e(B")
489 ("\e$(7"D#%\e(B" . "\e$(7%B\e(B")
490 ("\e$(7"G#%\e(B" . "\e$(7%R\e(B")
491 ("\e$(7"G#*\e(B" . "\e$(7%S\e(B")
492 ("\e$(7"G#:\e(B" . "\e$(7%Z\e(B")
493 ("\e$(7"!#>\e(B" . "\e$(7$!\e(B")
494 ("\e$(7"##>\e(B" . "\e$(7$#\e(B")
495 ("\e$(7"&#>\e(B" . "\e$(7$$\e(B")
496 ("\e$(7"0#>\e(B" . "\e$(7$&\e(B")
497 ("\e$(7"2#>\e(B" . "\e$(7$'\e(B")
498 ("\e$(7"@#>\e(B" . "\e$(7$+\e(B")
499 ("\e$(7"C#>\e(B" . "\e$(7$,\e(B")
500 ("\e$(7"D#>\e(B" . "\e$(7$-\e(B")
501 ("\e$(7"G#>\e(B" . "\e$(7$/\e(B")
502 ("\e$(7"H#>\e(B" . "\e$(7$0\e(B")
503 ("\e$(7"!#B\e(B" . "\e$(7$@\e(B")
504 ("\e$(7"##B\e(B" . "\e$(7$B\e(B")
505 ("\e$(7"5#B\e(B" . "\e$(7$C\e(B")
506 ("\e$(7"7#B\e(B" . "\e$(7$E\e(B")
507 ("\e$(7"9#B\e(B" . "\e$(7$F\e(B")
508 ("\e$(7"!#C\e(B" . "\e$(7$P\e(B")
509 ("\e$(7"##C\e(B" . "\e$(7$R\e(B")
510 ("\e$(7"0#C\e(B" . "\e$(7$S\e(B")
511 ("\e$(7"2#C\e(B" . "\e$(7$U\e(B")
512 ("\e$(7"5#C\e(B" . "\e$(7$V\e(B")
513 ("\e$(7"7#C\e(B" . "\e$(7$X\e(B")
514 ("\e$(7"9#C\e(B" . "\e$(7$Y\e(B")
515 ("\e$(7"G#C\e(B" . "\e$(7$[\e(B")
516 ("\e$(7"H#C\e(B" . "\e$(7$\\e(B")
517 ("\e$(7"(#C\e(B" . "\e$(7$]\e(B")
518 ("\e$(7"!#D\e(B" . "\e$(7$`\e(B")
519 ("\e$(7"##D\e(B" . "\e$(7$a\e(B")
520 ("\e$(7"7#D\e(B" . "\e$(7$b\e(B")
521 ("\e$(7"@#D\e(B" . "\e$(7$c\e(B")
522 ("\e$(7"C#D\e(B" . "\e$(7$d\e(B")
523 ("\e$(7"G#D\e(B" . "\e$(7$e\e(B")
524 ("\e$(7"C#!\e(B" . "\e$(7%!\e(B")
525 ("\e$(7"C##\e(B" . "\e$(7%"\e(B")
526 ("\e$(7"C#(\e(B" . "\e$(7%$\e(B")
527 ("\e$(7"C#0\e(B" . "\e$(7%&\e(B")
528 ("\e$(7"C#2\e(B" . "\e$(7%'\e(B")
529 ("\e$(7"C#4\e(B" . "\e$(7%(\e(B")
530 ("\e$(7"C#7\e(B" . "\e$(7%)\e(B")
531 ("\e$(7"C#9\e(B" . "\e$(7%*\e(B")
532 ("\e$(7"D#!\e(B" . "\e$(7%@\e(B")
533 ("\e$(7"D##\e(B" . "\e$(7%A\e(B")
534 ("\e$(7"D#4\e(B" . "\e$(7!!\e(B") ; dummy 0x2121 added 2000/06/08 for transition l -> lng
535 ("\e$(7"D#&\e(B" . "\e$(7%C\e(B")
536 ("\e$(7"D#(\e(B" . "\e$(7%D\e(B")
537 ("\e$(7"D#0\e(B" . "\e$(7%E\e(B")
538 ("\e$(7"D#2\e(B" . "\e$(7%F\e(B")
539 ("\e$(7"D#5\e(B" . "\e$(7%G\e(B")
540 ("\e$(7"D#7\e(B" . "\e$(7%H\e(B")
541 ("\e$(7"D#H\e(B" . "\e$(7%I\e(B")
542 ("\e$(7"G#!\e(B" . "\e$(7%P\e(B")
543 ("\e$(7"G##\e(B" . "\e$(7%Q\e(B")
544 ("\e$(7"G#0\e(B" . "\e$(7%T\e(B")
545 ("\e$(7"G#2\e(B" . "\e$(7%U\e(B")
546 ("\e$(7"G#4\e(B" . "\e$(7%V\e(B")
547 ("\e$(7"G#5\e(B" . "\e$(7%W\e(B")
548 ("\e$(7"G#7\e(B" . "\e$(7%X\e(B")
549 ("\e$(7"G#9\e(B" . "\e$(7%Y\e(B")))
551 (defconst tibetan-regexp
552 (let ((l (list tibetan-precomposed-transcription-alist
553 tibetan-consonant-transcription-alist
554 tibetan-vowel-transcription-alist
555 tibetan-modifier-transcription-alist
556 tibetan-subjoined-transcription-alist))
557 (separator "\\|")
558 tail pattern)
559 (while l
560 (setq tail (car l) l (cdr l))
561 (while tail
562 (setq pattern (cons separator (cons (car (car tail)) pattern))
563 tail (cdr tail))))
564 (apply 'concat (nreverse (cdr pattern))))
565 "Regexp matching a Tibetan transcription of a composable Tibetan sequence.
566 The result of matching is to be used for indexing alists at conversion
567 from a roman transcription to the corresponding Tibetan character.")
569 (defvar tibetan-precomposed-regexp
570 (purecopy
571 (let ((l tibetan-precomposed-transcription-alist)
572 temp)
573 (setq temp "^\\(")
574 (setq temp
575 (concat temp (car (car l))))
576 (setq l (cdr l))
577 (while l
578 (setq temp
579 (concat temp "\\|" (car (car l))))
580 (setq l (cdr l)))
581 (concat temp "\\)")))
582 "Regexp string to match a romanized Tibetan complex consonant.
583 The result of matching is to be used for indexing alists when the input key
584 from an input method is converted to the corresponding precomposed glyph.")
586 (defvar tibetan-precomposition-rule-regexp
587 (purecopy
588 (let ((l tibetan-precomposition-rule-alist)
589 temp)
590 (setq temp "\\(")
591 (setq temp (concat temp (car (car l))))
592 (setq l (cdr l))
593 (while l
594 (setq temp (concat temp "\\|" (car (car l))))
595 (setq l (cdr l)))
596 (concat temp "\\)")))
597 "Regexp string to match a sequence of Tibetan consonantic components, i.e.,
598 one base consonant and one or more subjoined consonants.
599 The result of matching is to be used for indexing alist when the component
600 sequence is converted to the corresponding precomposed glyph.
601 This also matches some punctuation characters which need conversion.")
603 (defvar tibetan-decomposed nil)
604 (defvar tibetan-decomposed-temp nil)
606 ;; For automatic composition.
607 (set-char-table-range
608 composition-function-table '(#xF00 . #xFD1)
609 (list (vector tibetan-composable-pattern 0 'font-shape-gstring)))
611 (provide 'tibetan)
613 ;;; tibetan.el ends here