Mercurial > emacs
annotate leim/quail/tibetan.el @ 29507:fff3dfd5b04d
(select-safe-coding-system): If
DEFAULT-CODING-SYSTEM is not specified, also check the most
preferred coding-system if buffer-file-coding-system is
`undecided'. From handa.
author | Dave Love <fx@gnu.org> |
---|---|
date | Thu, 08 Jun 2000 15:53:52 +0000 |
parents | cd1cb9bf30e1 |
children | a03c00e0dc04 |
rev | line source |
---|---|
18968 | 1 ;;; quail/tibetan.el -- Quail package for inputting Tibetan characters |
2 | |
3 ;; Copyright (C) 1995 Free Software Foundation, Inc. | |
4 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. | |
5 | |
6 ;; Keywords: multilingual, input method, Tibetan | |
7 | |
8 ;; This file is part of GNU Emacs. | |
9 | |
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) | |
13 ;; any later version. | |
14 | |
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. | |
19 | |
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. | |
23 | |
24 ;; Author: Toru TOMABECHI, <Toru.Tomabechi@orient.unil.ch> | |
25 | |
26 ;; Created: Feb. 17. 1997 | |
27 | |
28 ;; History: | |
29 ;; 1997.03.13 Support for inputting special signs and punctuations added. | |
30 ;; (Only Ext. Wylie input) | |
31 | |
32 ;;; Code: | |
33 | |
34 (require 'quail) | |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
35 (require 'tibet-util) |
18968 | 36 |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
37 ;; Now quail-current-key is set to Tibetan-Roman transcription. We |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
38 ;; set quail-current-str to the corresponding Tibetan string (composed |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
39 ;; if necessary). Both Wylie and TibKey input methods use this |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
40 ;; function. |
18968 | 41 |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
42 (defun quail-tibetan-update-translation (control-flag) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
43 (if (numberp control-flag) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
44 ;; Non-composable-character typed. |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
45 (setq quail-current-str |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
46 (buffer-substring (overlay-start quail-overlay) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
47 (overlay-end quail-overlay)) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
48 unread-command-events |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
49 (string-to-list |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
50 (substring quail-current-key control-flag))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
51 ;; Special treatment of "-d..." and "-y...". |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
52 (if (string-match "^-[dy]" quail-current-key) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
53 (setq quail-current-key (substring quail-current-key 1))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
54 (let ((str (tibetan-transcription-to-tibetan quail-current-key))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
55 ;; If quail-current-key is for punctuations, it can't be |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
56 ;; transcribed by tibetan-transcription-to-tibetan, thus STR |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
57 ;; contains ASCII string now. In that case, use the current |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
58 ;; characters set in quail-current-str. |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
59 (if (> (aref str 0) 255) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
60 (setq quail-current-str (tibetan-compose-string str)) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
61 (or quail-current-str |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
62 (setq quail-current-str quail-current-key))))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
63 control-flag) |
18968 | 64 |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
65 ;;; Wylie transcription based input methods. |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
66 |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
67 ;; Special alist for `$(7"A(B'. It must be treated as a subjoined |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
68 ;; consonant if it follows a consonant. |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
69 (defconst tibetan-wylie-quote-alist '(("'" . ?$(7"A(B))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
70 |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
71 ;; Special alist to avoid default stacking. |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
72 (defconst tibetan-wylie-non-stacking-alist |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
73 '(("-d" . "$(7"2(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
74 ("-y" . "$(7"B(B"))) |
18968 | 75 |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
76 ;; Punctuations are not transcribed. |
18968 | 77 |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
78 (defconst tibetan-wylie-punctuation-alist |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
79 '(("." . " ") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
80 (":" . "$(8"`(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
81 (" " . "$(8!;(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
82 ("/" . "$(8!=(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
83 ("//" . "$(7!>(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
84 ("////" . ["$(7!>(B $(7!>(B"]) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
85 ("$" . "$(8!?(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
86 ("/\"" . "$(8!@(B") ; Not defined in Ext. Wylie. |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
87 ("&" . "$(8!@(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
88 (";" . "$(8!A(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
89 ("%" . "$(8!D(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
90 ("!" . "$(7!8(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
91 ("<" . "$(7!l(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
92 (">" . "$(7!m(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
93 ("@" . "$(7"f(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
94 ("*" . ["$(7!4!5(B"]) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
95 ("#" . ["$(7!4!5!5(B"]) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
96 ("^" . "$(7!6(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
97 ("0" . "$(7!P(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
98 ("1" . "$(7!Q(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
99 ("2" . "$(7!R(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
100 ("3" . "$(7!S(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
101 ("4" . "$(7!T(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
102 ("5" . "$(7!U(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
103 ("6" . "$(7!V(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
104 ("7" . "$(7!W(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
105 ("8" . "$(7!X(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
106 ("9" . "$(7!Y(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
107 ("-0" . "$(7!c(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
108 ("-1" . "$(7!Z(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
109 ("-2" . "$(7![(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
110 ("-3" . "$(7!\(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
111 ("-4" . "$(7!](B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
112 ("-5" . "$(7!^(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
113 ("-6" . "$(7!_(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
114 ("-7" . "$(7!`(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
115 ("-8" . "$(7!a(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
116 ("-9" . "$(7!b(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
117 ("|" . "$(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(B"))) |
18968 | 118 |
119 (quail-define-package "tibetan-wylie" "Tibetan" "TIBw" t | |
120 "Tibetan character input by Extended Wylie key assignment. | |
121 | |
122 +-------------------------------------+ | |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
123 |$(7"!$(8!;(B k |$(7""$(8!;(B kh |$(7"#$(8!;(B g |$(7"$$(8!;(B gh |$(7"%$(8!;(B ng| $(7"S(B i $(8!=(B / |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
124 |$(7"&$(8!;(B c |$(7"'$(8!;(B ch |$(7"($(8!;(B j | |$(7"*$(8!;(B ny| $(7"U(B u $(7!>(B // |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
125 |$(7"+$(8!;(B T |$(7",$(8!;(B TH |$(7"-$(8!;(B D |$(7".$(8!;(B DH |$(7"/$(8!;(B N | $(7"[(B e $(7!>(B $(7!>(B //// |
18968 | 126 |$(7"0$(8!;(B t |$(7"1$(8!;(B th |$(7"2$(8!;(B d |$(7"3$(8!;(B dh |$(7"4$(8!;(B n | $(7"](B o $(7!A(B ; |
127 |$(7"5$(8!;(B p |$(7"6$(8!;(B ph |$(7"7$(8!;(B b |$(7"8$(8!;(B bh |$(7"9$(8!;(B m | $(7"\(B ai (ee, E) $(8!?(B $ | |
128 |$(7":$(8!;(B ts|$(7";$(8!;(B tsh|$(7"<$(8!;(B dz |$(7"=$(8!;(B dzh|$(7">$(8!;(B w | $(7"^(B au (oo, O) $(8!@(B & | |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
129 |$(7"?$(8!;(B zh|$(7"@$(8!;(B z |$(7"A$(8!;(B ' | |$(7"B$(8!;(B y | $(7"a(B I $(7#R#S#S(B * |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
130 |$(7"C$(8!;(B r |$(7"D$(8!;(B l |$(7"E$(8!;(B sh |$(7"F$(8!;(B SH |$(7"G$(8!;(B s | $(7"`(B : $(7#R#S#S#S(B # |
18968 | 131 |$(7"H$(8!;(B h |$(7"I$(8!;(B A |$(7"J$(8!;(B kSH| | | $(7"_(B M $(7!l(B $(7!m(B < > |
132 +-------------------------------------+ $(8!D(B % | |
133 (The consonant $(7"I$(8!;(B must be typed explicitly.) | |
134 | |
135 NOT SPECIFIED IN EXT. WYLIE: | |
136 +--------------------------------------------------------+ | |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
137 |$(7"c(B = ~ |$(7"d(B = ` |$(7"e(B = , |$(7"f(B = @ |$(7!g(B = _o|$(7!e(B = _O|$(7#R#S!I(B = ^| |
18968 | 138 +--------------------------------------------------------+ |
139 |$(7"i(B = x |$(7"j(B = X |$(7"g(B = v |$(7"h(B = V |$(7"k(B = q |$(7"l(B = Q | | |
140 +-----------------------------------------------+ | |
141 | |
142 SPECIAL KEYS | |
143 + : Consonant Stacking | |
144 \(Consonant stacking for ordinary Tibetan is done automatically) | |
145 - : No Consonant Stacking | |
146 \(To suppress automatic stacking for \"g-y\", | |
147 and to get da-drag in -r-d, -l-d .) | |
148 | : Special signs. | |
149 | |
150 Tsheg is assigned to SPC. Space is assigned to period '.'. | |
151 " | |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
152 nil nil nil nil nil nil nil nil |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
153 'quail-tibetan-update-translation) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
154 |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
155 ;; Here we build up a Quail map for a Tibtan sequence the whole of |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
156 ;; which can be one composition. |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
157 ;; |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
158 ;; A Tibetan syllable is typically structured as follows: |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
159 ;; [P] C [c+] V [M] [S [s]] |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
160 ;; ^^^^^^^^^^^^ |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
161 ;; where P:prefix, C:base consonant, c:subjoined consonant, |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
162 ;; V:vowel, M:vowel modifier, S:suffix, s:post suffix. |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
163 ;; In this pattern, the part indicated by "^^^" can be one composition. |
18968 | 164 |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
165 (quail-install-map |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
166 (quail-map-from-table |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
167 '((base-state (tibetan-consonant-transcription-alist . sq-state) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
168 (tibetan-precomposed-transcription-alist . s-state) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
169 (tibetan-wylie-non-stacking-alist . sq-state) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
170 tibetan-subjoined-transcription-alist |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
171 tibetan-vowel-transcription-alist |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
172 tibetan-modifier-transcription-alist |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
173 tibetan-wylie-punctuation-alist) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
174 (sq-state (tibetan-wylie-quote-alist . s-state) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
175 (tibetan-subjoined-transcription-alist . s-state)) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
176 (s-state (tibetan-subjoined-transcription-alist . s-state) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
177 (tibetan-vowel-transcription-alist . m-state)) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
178 (m-state tibetan-modifier-transcription-alist)))) |
18968 | 179 |
180 ;;; | |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
181 ;;; TibKey key alignment based input method |
18968 | 182 ;;; |
183 | |
184 (defconst tibetan-tibkey-to-transcription-alist | |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
185 '(;; consonant |
18968 | 186 ("`" . "`") ; sna ldan |
187 ("~" . "~") ; sna ldan + nada | |
188 ("q" . "k") ; ka | |
189 ("Q" ."kSH") ; kSHa | |
190 ("w" . "kh") ; kha | |
191 ("e" . "g") ; ga | |
192 ("r" . "ng") ; nga | |
193 ("t" . "c") ; ca | |
194 ("T" . "I") ; gi gu log | |
195 ("y" . "ch") ; cha | |
196 ("u" . "j") ; ja | |
197 ("i" . "ny") ; nya | |
198 ("o" . "t") ; ta | |
199 ("O" . "T") ; Ta | |
200 ("p" . "th") ; tha | |
201 ("P" . "TH") ; THa | |
202 ("[" . "d") ; da | |
203 ("{" . "D") ; Da | |
204 ("]" . "n") ; na | |
205 ("}" . "N") ; Na | |
206 ("a" . "p") ; pa | |
207 ("A" . "a") ; Vowel a (not used in original TibKey) | |
208 ("s" . "ph") ; pha | |
209 ("d" . "b") ; ba | |
210 ("f" . "m") ; ma | |
211 ("F" . "M") ; anusvara | |
212 ("g" . "u") ; zhabs kyu | |
213 ("G" . "i") ; gi gu | |
214 ("H" . ",") ; viraama | |
215 ("j" . "o") ; naro | |
216 ("J" . "e") ; 'greng bu | |
217 ("k" . "ts") ; tsa | |
218 ("l" . "tsh") ; tsha | |
219 (";" . "dz") ; dza | |
220 ("'" . "w") ; wa | |
221 ("\"" . "+w") ; wa zur | |
222 ("z" . "zh") ; zha | |
223 ("x" . "z") ; za | |
224 ("c" . "'") ; 'a | |
225 ("C" . "+'") ; 'a chung | |
226 ("v" . "y") ; ya | |
227 ("V" . "+y") ; ya btags | |
228 ("b" . "r") ; ra | |
229 ("B" . "+r") ; ra btags | |
230 ("n" . "l") ; la | |
231 ("N" . "+l") ; la btags | |
232 ("m" . "sh") ; sha | |
233 ("M" . "SH") ; SHa | |
234 ("," . "s") ; sa | |
235 ("." . "h") ; ha | |
236 ("/" . "A") ; Aa | |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
237 ;; subjoined |
18968 | 238 ("hq" . "+k") ; ka |
239 ("hQ" ."+kSH") ; kSHa | |
240 ("hw" . "+kh") ; kha | |
241 ("he" . "+g") ; ga | |
242 ("hr" . "+ng") ; nga | |
243 ("ht" . "+c") ; ca | |
244 ("hy" . "+ch") ; cha | |
245 ("hu" . "+j") ; ja | |
246 ("hi" . "+ny") ; nya | |
247 ("ho" . "+t") ; ta | |
248 ("hO" . "+T") ; Ta | |
249 ("hp" . "+th") ; tha | |
250 ("hP" . "+TH") ; THa | |
251 ("h[" . "+d") ; da | |
252 ("h{" . "+D") ; Da | |
253 ("h]" . "+n") ; na | |
254 ("h}" . "+N") ; Na | |
255 ("ha" . "+p") ; pa | |
256 ("hs" . "+ph") ; pha | |
257 ("hd" . "+b") ; ba | |
258 ("hf" . "+m") ; ma | |
259 ("hk" . "+ts") ; tsa | |
260 ("hl" . "+tsh") ; tsha | |
261 ("h;" . "+dz") ; dza | |
262 ("h'" . "+w") ; wa | |
263 ("hz" . "+zh") ; zha | |
264 ("hx" . "+z") ; za | |
265 ("hc" . "+'") ; 'a | |
266 ("hv" . "+y") ; ya | |
267 ("hb" . "+r") ; ra | |
268 ("hn" . "+l") ; la | |
269 ("hm" . "+sh") ; sha | |
270 ("hM" . "+SH") ; SHa | |
271 ("h," . "+s") ; sa | |
272 ("h." . "+h") ; ha | |
273 ("h/" . "+A") ; Aa | |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
274 ;; Special rule for `$(7"B(B' to avoid stacking. |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
275 ("E" . "-y") |
18968 | 276 )) |
277 | |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
278 (defconst tibetan-consonant-tibkey-alist nil) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
279 (defconst tibetan-subjoined-tibkey-alist nil) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
280 (defconst tibetan-vowel-tibkey-alist nil) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
281 (defconst tibetan-modifier-tibkey-alist nil) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
282 (defconst tibetan-non-stacking-tibkey-alist nil) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
283 |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
284 (let ((type-list '("consonant" "subjoined" "vowel" "modifier" "non-stacking")) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
285 (tail tibetan-tibkey-to-transcription-alist) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
286 elt) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
287 (while tail |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
288 (setq elt (car tail) tail (cdr tail)) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
289 (let ((types type-list) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
290 type transcription trans-alist tibkey-alist) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
291 (while types |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
292 (setq type (car types) types (cdr types)) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
293 (setq trans-alist |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
294 (if (string= type "non-stacking") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
295 'tibetan-wylie-non-stacking-alist |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
296 (intern (format "tibetan-%s-transcription-alist" type))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
297 transcription |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
298 (cdr (assoc (cdr elt) (symbol-value trans-alist)))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
299 (when transcription |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
300 (setq tibkey-alist (intern (format "tibetan-%s-tibkey-alist" type))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
301 (set tibkey-alist |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
302 (cons (cons (car elt) transcription) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
303 (symbol-value tibkey-alist))))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
304 (or tibkey-alist |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
305 (error "No Tibetan transcription for %s" (cdr elt)))))) |
18968 | 306 |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
307 (defconst tibetan-punctuation-tibkey-alist |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
308 '(("1" . "$(7!Q(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
309 ("!" . ["$(7#R#S#S#S(B"]) ; nyi zla long |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
310 ("2" . "$(7!R(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
311 ("@" . "$(7#S(B") ; nyi zla simple |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
312 ("3" . "$(7!S(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
313 ;;; ("#" ) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
314 ("4" . "$(7!T(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
315 ;;; ("$" ) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
316 ("5" . "$(7!U(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
317 ("%" . "$(8!D(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
318 ("6" . "$(7!V(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
319 ("^" . "$(7!1(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
320 ("7" . "$(7!W(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
321 ("8" . "$(7!X(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
322 ;;; ("*" ) ; avagraha, not supported yet |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
323 ("9" . "$(7!Y(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
324 ("(" . "$(7!l(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
325 ("0" . "$(7!P(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
326 (")" . "$(7!m(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
327 ;;; ("-" ) ; enphatic, not yet supported |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
328 ;;; ("_" ) ; id. |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
329 ;;; ("=" ) ; special sign, not yet supported |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
330 ("+" . "$(8!A(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
331 ("\\" . "$(8!?(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
332 ("|" . "$(7!8(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
333 ("I" . "$(7"f(B") ; avagraha |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
334 (":" . "$(8"`(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
335 ;;; (">" ?$(8!;(B) ; to be assigned to SPC |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
336 (">" . " ") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
337 ("?" . "$(8!=(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
338 ("??" . "$(7!>(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
339 ("????" . ["$(7!>(B $(7!>(B"]) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
340 (" " . "$(8!;(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
341 )) |
18968 | 342 |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
343 ;; Convert TibKey string to Tibetan-Roman transcription string. |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
344 ;; If there's no proper conversion, return nil. |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
345 (defun quail-tibkey-to-transcription (tibkey) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
346 (let ((len (length tibkey)) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
347 (i 0) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
348 (trans-list nil)) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
349 (while (< i len) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
350 (let ((last len) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
351 trans) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
352 (while (and (not trans) (> last i)) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
353 (or (setq trans (cdr (assoc (substring tibkey i last) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
354 tibetan-tibkey-to-transcription-alist))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
355 (setq last (1- last)))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
356 (if trans |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
357 (setq trans-list (cons trans trans-list) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
358 i last) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
359 (setq trans-list nil i len)))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
360 (apply 'concat (nreverse trans-list)))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
361 |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
362 (defvar quail-tibkey-characters nil) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
363 |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
364 (defun quail-tibkey-update-translation (control-flag) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
365 (if (integerp control-flag) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
366 ;; Non-composable-character typed. |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
367 (setq quail-current-str |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
368 (buffer-substring (overlay-start quail-overlay) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
369 (overlay-end quail-overlay)) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
370 unread-command-events |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
371 (string-to-list |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
372 (substring quail-current-key control-flag))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
373 (let ((transcription (quail-tibkey-to-transcription quail-current-key))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
374 (if (> (length transcription) 0) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
375 (let ((quail-current-key transcription)) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
376 (setq control-flag |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
377 (quail-tibetan-update-translation control-flag))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
378 (or quail-current-str |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
379 (setq quail-current-str quail-current-key))))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
380 control-flag) |
18968 | 381 |
382 (quail-define-package "tibetan-tibkey" "Tibetan" "TIBt" t | |
383 "Tibetan character input by TibKey key assignment. | |
384 | |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
385 \(This implementation is still incomplete. |
18968 | 386 Therefore, the following key assignment is a provisional one.) |
387 | |
388 [NOT SHIFTED] | |
389 | |
390 +-------------------------------------------------------+ | |
391 |`$(7"d(B|1$(7!Q(B|2$(7!R(B|3$(7!S(B|4$(7!T(B|5$(7!U(B|6$(7!V(B|7$(7!W(B|8$(7!X(B|9$(7!Y(B|0$(7!P(B|- |= |\\$(7!8(B| | |
392 +-------------------------------------------------------+ | |
393 |q$(7"!(B|w$(7""(B|e$(7"#(B|r$(7"%(B|t$(7"&(B|y$(7"'(B|u$(7"((B|i$(7"*(B|o$(7"0(B|p$(7"1(B|[$(7"2(B|]$(7"4(B| | |
394 +-----------------------------------------------+ | |
395 |a$(7"5(B| s$(7"6(B| d$(7"7(B|f$(7"9(B|g$(7"U(B|h |j$(7"](B|k$(7":(B|l$(7";(B|;$(7"<(B|'$(7">(B| | |
396 +---------------------------------------------+ | |
397 |z$(7"?(B|x$(7"@(B|c$(7"A(B|v$(7"B(B|b$(7"C(B|n$(7"D(B|m$(7"E(B|,$(7"G(B|.$(7"H(B|/$(7"I(B| | |
398 +---------------------------------------+ | |
399 The key 'h' is used for consonant stacking. | |
400 | |
401 [SHIFTED] | |
402 | |
403 +----------------------------------------------------------+ | |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
404 |~$(7"c(B|!$(7#R#S(B|@$(7#S(B|# |$ |%$(8!D(B |^$(7!1(B|& |* |($(7!l(B|)$(7!m(B|_ |+$(7!A(B| |$(7!8(B| |
18968 | 405 +----------------------------------------------------------+ |
406 |Q$(7"J(B|W$(7#T(B|E |R |T$(7"a(B|Y |U |I$(7"f(B|O$(7"+(B|P$(7",(B|{$(7"-(B|}$(7"/(B| | |
407 +-----------------------------------------------+ | |
408 |A |S |D |F$(7"_(B|G$(7"S(B|H$(7"e(B|J$(7"[(B|K |L |:$(7"`(B|\"$(7#>(B| | |
409 +-------------------------------------------+ | |
410 |Z |X |C$(7#A(B|V$(7#B(B|B$(7#C(B|N$(7#D(B|M$(7"F(B|< |> |?$(8!=(B | | |
411 +---------------------------------------+ | |
412 | |
413 DIFFERENCE FROM THE ORIGINAL TIBKEY: | |
414 | |
415 1. Vowel 'a' should be typed explicitly by the key 'A'. | |
416 This is really inconvenient. But to make the coding | |
417 scheme clear, it is desirable to have an explicite | |
418 vowel sign for 'a'. | |
419 2. Tsheg is assigned to SPC key. You can input a space | |
420 by typing '>'. | |
421 4. To avoid the default stacking $(7$B(B and to obtain $(7"#"B(B, | |
422 type 'E' instead of 'v' (=$(7"B(B). | |
423 3. There are many characters that are not supported in the | |
424 current implementation (especially special signs). I hope | |
425 I'll complete in a future revision. | |
426 " | |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
427 nil nil nil nil nil nil nil nil |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
428 'quail-tibkey-update-translation) |
18968 | 429 |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
430 (quail-install-map |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
431 (quail-map-from-table |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
432 '((base-state (tibetan-consonant-tibkey-alist . s-state) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
433 (tibetan-non-stacking-tibkey-alist . s-state) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
434 tibetan-subjoined-tibkey-alist |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
435 tibetan-vowel-tibkey-alist |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
436 tibetan-modifier-tibkey-alist |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
437 tibetan-punctuation-tibkey-alist) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
438 (s-state (tibetan-subjoined-tibkey-alist . s-state) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
439 (tibetan-vowel-tibkey-alist . m-state)) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
440 (m-state tibetan-modifier-tibkey-alist)))) |