1 ;;; quail/tibetan.el -- Quail package for inputting Tibetan characters
3 ;; Copyright (C) 1995 Free Software Foundation, Inc.
4 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
6 ;; Keywords: multilingual, input method, Tibetan
8 ;; This file is part of GNU Emacs.
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; GNU Emacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to
22 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24 ;; Author: Toru TOMABECHI, <Toru.Tomabechi@orient.unil.ch>
26 ;; Created: Feb. 17. 1997
29 ;; 1997.03.13 Support for inputting special signs and punctuations added.
30 ;; (Only Ext. Wylie input)
37 ;;; Functions for making some composite punctuations.
40 (defun tibetan-quail-bzhi-shad (&rest ignore
)
42 (quail-delete-overlays)
43 (insert (compose-chars ?
\e$
(7!>\e(B '(mr . ml
) ?
\x20 '(mr . ml
) ?
\e$
(7!>\e(B))
44 (throw 'quail-tag nil
))
46 (defun tibetan-quail-nyi-zla (&rest ignore
)
48 (quail-delete-overlays)
49 (insert (compose-chars ?
\e$
(7#R
\e(B '(mr . ml
) ?
\e$
(7#S
\e(B))
50 (throw 'quail-tag nil
))
52 (defun tibetan-quail-nyi-zla-phur-shad (&rest ignore
)
54 (quail-delete-overlays)
55 (insert (compose-chars ?
\e$
(7#R
\e(B '(mr . ml
) ?
\e$
(7#S
\e(B '(bc . tl
) ?
\e$
(7!I
\e(B))
56 (throw 'quail-tag nil
))
58 (defun tibetan-quail-nyi-zla-double (&rest ignore
)
60 (quail-delete-overlays)
61 (insert (compose-chars ?
\e$
(7#R
\e(B '(mr . ml
) ?
\e$
(7#S
\e(B '(mr . ml
) ?
\e$
(7#S
\e(B))
62 (throw 'quail-tag nil
))
64 (defun tibetan-quail-nyi-zla-triple (&rest ignore
)
66 (quail-delete-overlays)
67 (insert (compose-chars ?
\e$
(7#R
\e(B '(mr . ml
) ?
\e$
(7#S
\e(B '(mr . ml
) ?
\e$
(7#S
\e(B '(mr . ml
) ?
\e$
(7#S
\e(B))
68 (throw 'quail-tag nil
))
71 ;;; Setting-ups for Extended Wylie input.
74 (defun quail-tibetan-input-wylie (key &rest ignore
)
77 (quail-delete-overlays)
78 (setq pc
(preceding-char))
79 (if (not (eq (point) (point-min)))
80 (delete-backward-char 1 nil
))
81 (insert (tibetan-composition pc key
))
82 (throw 'quail-tag nil
)))
85 (quail-define-package "tibetan-wylie" "Tibetan" "TIBw" t
86 "Tibetan character input by Extended Wylie key assignment.
88 +-------------------------------------+
89 |\e2\e$(7"!`#T
\e1\e$
(8!;\e(B k |\e2\e$(7""`#T\e1\e$(8!;\e(B kh |\e2\e$(7"#`#T\e1\e$(8!;\e(B g |\e2\e$(7"$`#T\e1\e$(8!;\e(B gh |\e2\e$(7"%`#T\e1\e$(8!;\e(B ng| \e$(7"S\e(B i \e$(8!=\e(B /
90 |
\e2\e$
(7"&`#T\e1\e$(8!;\e(B c |\e2\e$(7"'`#T
\e1\e$
(8!;\e(B ch |\e2\e$(7"(`#T\e1\e$(8!;\e(B j | |\e$(7"*\e$(8!;\e(B ny| \e$(7"U\e(B u \e$(7!>\e(B //
91 |
\e$
(7"+\e$(8!;\e(B T |\e$(7",\e$
(8!;\e(B TH |\e$(7"-\e$(8!;\e(B D |\e$(7".\e$(8!;\e(B DH |\e$(7"/\e$(8!;\e(B N | \e$(7"[\e(B e \e2\e$(7!>P\e(B P\e$(7!>\e1\e(B ////
92 |
\e$
(7"0\e$(8!;\e(B t |\e$(7"1\e$
(8!;\e(B th |\e$(7"2\e$(8!;\e(B d |\e$(7"3\e$(8!;\e(B dh |\e$(7"4\e$(8!;\e(B n | \e$(7"]\e(B o \e$(7!A\e(B ;
93 |
\e$
(7"5\e$(8!;\e(B p |\e$(7"6\e$
(8!;\e(B ph |\e$(7"7\e$(8!;\e(B b |\e$(7"8\e$(8!;\e(B bh |\e$(7"9\e$(8!;\e(B m | \e$(7"\\e(B ai (ee, E) \e$(8!?\e(B $
94 |
\e$
(7":\e$(8!;\e(B ts|\e$(7";\e$(8!;\e(B tsh|\e$(7"<\e$(8!;\e(B dz |\e$(7"=\e$(8!;\e(B dzh|\e$(7">\e$(8!;\e(B w | \e$(7"^\e(B au (oo, O) \e$(8!@\e(B &
95 |
\e$
(7"?\e$(8!;\e(B zh|\e$(7"@\e$
(8!;\e(B z |\e$(7"A\e$(8!;\e(B ' | |\e$(7"B\e$(8!;\e(B y | \e$(7"a\e(B I \e2\e$(7#RP#SP#S\e1\e(B *
96 |
\e$
(7"C\e$(8!;\e(B r |\e$(7"D
\e$
(8!;\e(B l |\e$(7"E\e$(8!;\e(B sh |\e$(7"F\e$(8!;\e(B SH |\e$(7"G\e$(8!;\e(B s | \e$(7"`\e(B : \e2\e$(7#RP#SP#SP#S\e1\e(B #
97 |
\e$
(7"H\e$(8!;\e(B h |\e$(7"I
\e$
(8!;\e(B A |\e$(7"J\e$(8!;\e(B kSH| | | \e$(7"_\e(B M \e$(7!l\e(B \e$(7!m\e(B < >
98 +-------------------------------------
+ \e$
(8!D
\e(B %
99 (The consonant
\e$
(7"I\e$(8!;\e(B must be typed explicitly.)
101 NOT SPECIFIED IN EXT. WYLIE:
102 +--------------------------------------------------------+
103 |\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 = _o|\e$(7!e\e(B = _O|\e2\e$(7#RP#S_!I\e1\e(B = ^|
104 +--------------------------------------------------------+
105 |\e$(7"i
\e(B = x |
\e$
(7"j\e(B = X |\e$(7"g
\e(B = v |
\e$
(7"h\e(B = V |\e$(7"k
\e(B = q |
\e$
(7"l\e(B = Q |
106 +-----------------------------------------------+
109 + : Consonant Stacking
110 \(Consonant stacking for ordinary Tibetan is done automatically)
111 - : No Consonant Stacking
112 \(To suppress automatic stacking for \"g-y\",
113 and to get da-drag in -r-d, -l-d .)
116 Tsheg is assigned to SPC. Space is assigned to period '.'.
122 ("k" quail-tibetan-input-wylie
)
123 ("g" quail-tibetan-input-wylie
)
124 ("c" quail-tibetan-input-wylie
)
125 ("j" quail-tibetan-input-wylie
)
126 ("T" quail-tibetan-input-wylie
)
127 ("D" quail-tibetan-input-wylie
)
128 ("N" quail-tibetan-input-wylie
)
129 ("t" quail-tibetan-input-wylie
)
130 ("d" quail-tibetan-input-wylie
)
131 ("n" quail-tibetan-input-wylie
)
132 ("p" quail-tibetan-input-wylie
)
133 ("b" quail-tibetan-input-wylie
)
134 ("m" quail-tibetan-input-wylie
)
135 ("w" quail-tibetan-input-wylie
)
136 ("z" quail-tibetan-input-wylie
)
137 ("'" quail-tibetan-input-wylie
)
138 ("y" quail-tibetan-input-wylie
)
139 ("r" quail-tibetan-input-wylie
)
140 ("l" quail-tibetan-input-wylie
)
141 ("SH" quail-tibetan-input-wylie
)
142 ("s" quail-tibetan-input-wylie
)
143 ("h" quail-tibetan-input-wylie
)
144 ("H" quail-tibetan-input-wylie
)
145 ("A" quail-tibetan-input-wylie
)
146 ("+k" quail-tibetan-input-wylie
)
147 ("+g" quail-tibetan-input-wylie
)
148 ("+c" quail-tibetan-input-wylie
)
149 ("+j" quail-tibetan-input-wylie
)
150 ("+T" quail-tibetan-input-wylie
)
151 ("+D" quail-tibetan-input-wylie
)
152 ("+N" quail-tibetan-input-wylie
)
153 ("+t" quail-tibetan-input-wylie
)
154 ("+d" quail-tibetan-input-wylie
)
155 ("+n" quail-tibetan-input-wylie
)
156 ("+p" quail-tibetan-input-wylie
)
157 ("+b" quail-tibetan-input-wylie
)
158 ("+m" quail-tibetan-input-wylie
)
159 ("+w" quail-tibetan-input-wylie
)
160 ("+z" quail-tibetan-input-wylie
)
161 ("+'" quail-tibetan-input-wylie
)
162 ("+y" quail-tibetan-input-wylie
)
163 ("+r" quail-tibetan-input-wylie
)
164 ("+l" quail-tibetan-input-wylie
)
165 ("+SH" quail-tibetan-input-wylie
)
166 ("+s" quail-tibetan-input-wylie
)
167 ("+h" quail-tibetan-input-wylie
)
168 ("+H" quail-tibetan-input-wylie
)
169 ("+A" quail-tibetan-input-wylie
)
170 ("-d" ?
\e$
(7"2\e(B) ; To avoid default stacking
171 ("-y
" ?\e$(7"B
\e(B) ; Idem.
172 ("a" quail-tibetan-input-wylie
) ; invisible vowel sign
173 ("i" quail-tibetan-input-wylie
)
174 ("u" quail-tibetan-input-wylie
)
175 ("e" quail-tibetan-input-wylie
)
176 ("o" quail-tibetan-input-wylie
)
177 ("I" quail-tibetan-input-wylie
)
178 ("E" quail-tibetan-input-wylie
)
179 ("O" quail-tibetan-input-wylie
)
180 ("M" quail-tibetan-input-wylie
)
181 ("~" quail-tibetan-input-wylie
)
182 ("`" quail-tibetan-input-wylie
)
183 ("," quail-tibetan-input-wylie
)
184 ("x" quail-tibetan-input-wylie
)
185 ("X" quail-tibetan-input-wylie
)
186 ("v" quail-tibetan-input-wylie
)
187 ("V" quail-tibetan-input-wylie
)
188 ("q" quail-tibetan-input-wylie
)
189 ("Q" quail-tibetan-input-wylie
)
190 ("_o" quail-tibetan-input-wylie
)
191 ("_O" quail-tibetan-input-wylie
)
192 ;;; ("_/" quail-tibetan-input-wylie)
197 ("////" tibetan-quail-bzhi-shad)
199 ("/\"" ?\e$(8!@\e(B) ; Not defined in Ext. Wylie.
207 ("*" tibetan-quail-nyi-zla-double)
208 ("#" tibetan-quail-nyi-zla-triple)
209 ("^
" tibetan-quail-nyi-zla-phur-shad)
230 ("|
" "\e$
(7!1!2!3!9!:!B
!C
!E
!F
!G
!H
!I
!J
!K
!L
!M
!N
!O
!d
!f
!h
!j
!k
!n
!o
\e(B")
234 ;;; Setting-ups for TibKey input
237 (defconst tibetan-tibkey-to-transcription-alist
239 ("`" . "`") ; sna ldan
240 ("~
" . "~
") ; sna ldan + nada
247 ("T
" . "I
") ; gi gu log
260 ("A
" . "a
") ; Vowel a (not used in original TibKey)
264 ("F
" . "M
") ; anusvara
265 ("g
" . "u
") ; zhabs kyu
267 ("H
" . ",") ; viraama
269 ("J
" . "e
") ; 'greng bu
274 ("\"" .
"+w") ; wa zur
278 ("C" .
"+'") ; 'a chung
280 ("V" .
"+y") ; ya btags
282 ("B" .
"+r") ; ra btags
284 ("N" .
"+l") ; la btags
292 ("hQ" .
"+kSH") ; kSHa
313 ("hl" .
"+tsh") ; tsha
329 (defun quail-tibetan-input-tibkey (key &rest ignore
)
331 (setq trans
(cdr (assoc key tibetan-tibkey-to-transcription-alist
)))
332 (quail-delete-region)
333 (quail-delete-overlays)
334 (setq pc
(preceding-char))
335 (if (not (eq (point) (point-min)))
336 (delete-backward-char 1 nil
))
337 (insert (tibetan-composition pc trans
))
338 (throw 'quail-tag nil
)))
342 (quail-define-package "tibetan-tibkey" "Tibetan" "TIBt" t
343 "Tibetan character input by TibKey key assignment.
345 (This implementation is still incomplete.
346 Therefore, the following key assignment is a provisional one.)
350 +-------------------------------------------------------+
351 |`\e$(7"d
\e(B|
1\e$
(7!Q
\e(B|
2\e$
(7!R
\e(B|
3\e$
(7!S
\e(B|
4\e$
(7!T
\e(B|
5\e$
(7!U
\e(B|
6\e$
(7!V
\e(B|
7\e$
(7!W
\e(B|
8\e$
(7!X
\e(B|
9\e$
(7!Y
\e(B|
0\e$
(7!P
\e(B|- |
= |
\\\e$
(7!8\e(B|
352 +-------------------------------------------------------
+
353 |q
\e$
(7"!\e(B|w\e$(7""\e(B|e\e$(7"#\e(B|r
\e$
(7"%\e(B|t\e$(7"&\e(B|y
\e$
(7"'\e(B|u\e$(7"(\e(B|i
\e$
(7"*\e(B|o\e$(7"0\e(B|p
\e$
(7"1\e(B|[\e$(7"2\e(B|
]\e$
(7"4\e(B|
354 +-----------------------------------------------+
355 |a\e$(7"5\e(B| s
\e$
(7"6\e(B| d\e$(7"7\e(B|f
\e$
(7"9\e(B|g\e$(7"U
\e(B|h |j
\e$
(7"]\e(B|k\e$(7":\e(B|l
\e$
(7";\e(B|;\e$(7"<\e(B|
'\e$
(7">\e(B|
356 +---------------------------------------------+
357 |z\e$(7"?
\e(B|x
\e$
(7"@\e(B|c\e$(7"A
\e(B|v
\e$
(7"B\e(B|b\e$(7"C
\e(B|n
\e$
(7"D\e(B|m\e$(7"E
\e(B|
,\e$
(7"G\e(B|.\e$(7"H
\e(B|
/\e$
(7"I\e(B|
358 +---------------------------------------+
359 The key 'h' is used for consonant stacking.
363 +----------------------------------------------------------+
364 |~\e$(7"c
\e(B|
!\e2\e$
(7#RP
#S
\e1\e(B|
@\e$
(7#S
\e(B|
# |$ |%
\e$
(8!D
\e(B |^
\e$
(7!1\e(B|
& |
* |
(\e$
(7!l
\e(B|
)\e$
(7!m
\e(B|_ |
+\e$
(7!A
\e(B| |
\e$
(7!8\e(B|
365 +----------------------------------------------------------
+
366 |Q
\e$
(7"J\e(B|W\e$(7#T\e(B|E |R |T\e$(7"a
\e(B|Y |U |I
\e$
(7"f\e(B|O\e$(7"+\e(B|P
\e$
(7",\e(B|{\e$(7"-
\e(B|
}\e$
(7"/\e(B|
367 +-----------------------------------------------+
368 |A |S |D |F\e$(7"_
\e(B|G
\e$
(7"S\e(B|H\e$(7"e
\e(B|J
\e$
(7"[\e(B|K |L |:\e$(7"`\e(B|
\"\e$
(7#>\e(B|
369 +-------------------------------------------
+
370 |Z |X |C
\e$
(7#A
\e(B|V
\e$
(7#B
\e(B|B
\e$
(7#C
\e(B|N
\e$
(7#D
\e(B|M
\e$
(7"F\e(B|< |> |?\e$(8!=\e(B |
371 +---------------------------------------+
373 DIFFERENCE FROM THE ORIGINAL TIBKEY:
375 1. Vowel 'a' should be typed explicitly by the key 'A'.
376 This is really inconvenient. But to make the coding
377 scheme clear, it is desirable to have an explicite
379 2. Tsheg is assigned to SPC key. You can input a space
381 4. To avoid the default stacking \e$(7$B\e(B and to obtain \e$(7"#"B\e(B,
382 type 'E' instead of 'v' (=\e$(7"B
\e(B).
383 3. There are many characters that are not supported in the
384 current implementation
(especially special signs
). I hope
385 I
'll complete in a future revision.
390 ("`" quail-tibetan-input-tibkey) ; sna ldan, not supported yet
391 ("~
" quail-tibetan-input-tibkey) ; sna ldan + nada
393 ("!" tibetan-quail-nyi-zla) ; nyi zla long
395 ("@" ?\e$(7#S\e(B) ; nyi zla simple
406 ;;; ("*" ) ; avagraha, not supported yet
411 ;;; ("-
" ) ; enphatic, not yet supported
413 ;;; ("=" ) ; special sign, not yet supported
417 ("q
" quail-tibetan-input-tibkey) ; ka
418 ("Q
" quail-tibetan-input-tibkey) ; kSHa
419 ("w
" quail-tibetan-input-tibkey) ; kha
420 ("e
" quail-tibetan-input-tibkey) ; ga
422 ("r" quail-tibetan-input-tibkey
) ; nga
423 ("t" quail-tibetan-input-tibkey
) ; ca
424 ("T" quail-tibetan-input-tibkey
) ; gi gu log
425 ("y" quail-tibetan-input-tibkey
) ; cha
426 ("u" quail-tibetan-input-tibkey
) ; ja
427 ("i" quail-tibetan-input-tibkey
) ; nya
428 ("I" ?
\e$
(7"f\e(B) ; avagraha
429 ("o
" quail-tibetan-input-tibkey) ; ta
430 ("O
" quail-tibetan-input-tibkey) ; Ta
431 ("p
" quail-tibetan-input-tibkey) ; tha
432 ("P
" quail-tibetan-input-tibkey) ; THa
433 ("[" quail-tibetan-input-tibkey) ; da
434 ("{" quail-tibetan-input-tibkey) ; Da
435 ("]" quail-tibetan-input-tibkey) ; na
436 ("}" quail-tibetan-input-tibkey) ; Na
437 ("a
" quail-tibetan-input-tibkey) ; pa
438 ("A
" quail-tibetan-input-tibkey) ; Vowel sign a
439 ("s
" quail-tibetan-input-tibkey) ; pha
440 ("d
" quail-tibetan-input-tibkey) ; ba
441 ;;; ("D
" ) ; special sign, not supported yet
442 ("f
" quail-tibetan-input-tibkey) ; ma
443 ("F
" quail-tibetan-input-tibkey) ; anusvara
444 ("g
" quail-tibetan-input-tibkey) ; zhabs kyu
445 ("G
" quail-tibetan-input-tibkey) ; gi gu
446 ("H
" quail-tibetan-input-tibkey) ; viraama
447 ("j
" quail-tibetan-input-tibkey) ; naro
448 ("J
" quail-tibetan-input-tibkey) ; 'greng bu
449 ("k
" quail-tibetan-input-tibkey);;tsa
450 ;;; ("K
" ) ; tsadru, not supported yet
451 ("l
" quail-tibetan-input-tibkey) ; tsha
452 (";" quail-tibetan-input-tibkey) ; dza
454 ("'" quail-tibetan-input-tibkey) ; wa
455 ("\"" quail-tibetan-input-tibkey) ; wa zur
456 ("z
" quail-tibetan-input-tibkey) ; zha
457 ("x
" quail-tibetan-input-tibkey) ; za
458 ("c
" quail-tibetan-input-tibkey) ; 'a
459 ("C
" quail-tibetan-input-tibkey) ; 'a chung
460 ("v
" quail-tibetan-input-tibkey) ; ya
461 ("V
" quail-tibetan-input-tibkey) ; ya btags
462 ("b
" quail-tibetan-input-tibkey) ; ra
463 ("B
" quail-tibetan-input-tibkey) ; ra btags
464 ("n
" quail-tibetan-input-tibkey) ; la
465 ("N
" quail-tibetan-input-tibkey) ; la btags
466 ("m
" quail-tibetan-input-tibkey) ; sha
467 ("M
" quail-tibetan-input-tibkey) ; SHa
468 ("," quail-tibetan-input-tibkey) ; sa
469 (".
" quail-tibetan-input-tibkey) ; ha
470 ;;; (">" ?\e$(8!;\e(B) ; to be assigned to SPC
472 ("/" quail-tibetan-input-tibkey) ; Aa
475 ("????
" tibetan-quail-bzhi-shad)
478 ("hq
" quail-tibetan-input-tibkey) ; ka
479 ("hQ
" quail-tibetan-input-tibkey) ; kSHa
480 ("hw
" quail-tibetan-input-tibkey) ; kha
481 ("he
" quail-tibetan-input-tibkey) ; ga
482 ("hr
" quail-tibetan-input-tibkey) ; nga
483 ("ht
" quail-tibetan-input-tibkey) ; ca
484 ("hy
" quail-tibetan-input-tibkey) ; cha
485 ("hu
" quail-tibetan-input-tibkey) ; ja
486 ("hi
" quail-tibetan-input-tibkey) ; nya
487 ("ho
" quail-tibetan-input-tibkey) ; ta
488 ("hO
" quail-tibetan-input-tibkey) ; Ta
489 ("hp
" quail-tibetan-input-tibkey) ; tha
490 ("hP
" quail-tibetan-input-tibkey) ; THa
491 ("h
[" quail-tibetan-input-tibkey) ; da
492 ("h
{" quail-tibetan-input-tibkey) ; Da
493 ("h
]" quail-tibetan-input-tibkey) ; na
494 ("h
}" quail-tibetan-input-tibkey) ; Na
495 ("ha
" quail-tibetan-input-tibkey) ; pa
496 ("hs
" quail-tibetan-input-tibkey) ; pha
497 ("hd
" quail-tibetan-input-tibkey) ; ba
498 ("hf
" quail-tibetan-input-tibkey) ; ma
499 ("hk
" quail-tibetan-input-tibkey) ; tsa
500 ("hl
" quail-tibetan-input-tibkey) ; tsha
501 ("h
;" quail-tibetan-input-tibkey) ; dza
502 ("h'" quail-tibetan-input-tibkey
) ; wa
503 ("hz" quail-tibetan-input-tibkey
) ; zha
504 ("hx" quail-tibetan-input-tibkey
) ; za
505 ("hc" quail-tibetan-input-tibkey
) ; 'a
506 ("hv" quail-tibetan-input-tibkey
) ; ya
507 ("hb" quail-tibetan-input-tibkey
) ; ra
508 ("hn" quail-tibetan-input-tibkey
) ; la
509 ("hm" quail-tibetan-input-tibkey
) ; sha
510 ("hM" quail-tibetan-input-tibkey
) ; SHa
511 ("h," quail-tibetan-input-tibkey
) ; sa
512 ("h." quail-tibetan-input-tibkey
) ; ha
513 ("h/" quail-tibetan-input-tibkey
) ; Aa
516 ;;; quail/tibetan.el ends here.