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