Mercurial > emacs
annotate leim/quail/tibetan.el @ 30744:6181f12f7f51
(trace_move) [GLYPH_DEBUG]: New variable.
(TRACE_MOVE) [GLYPH_DEBUG]: New macro.
(move_it_in_display_line_to): Record iterator's ascent and descent
before producing glyphs, and restore them when we know the glyph
doesn't fit on the line.
(move_it_to): Restructured so that it's easier to debug. If
moving to a vpos, and not moving to an x or character position,
stop as soon as the specified vpos is reached; don't move further
into that line because that might change the computed line height.
(try_cursor_movement): New function, extracted from the cursor
movement branch of redisplay_window. If ending on a partially
visible line, don't try to scroll if the cursor line is taller
than the window.
(redisplay_window): Use try_cursor_movement.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Thu, 10 Aug 2000 19:15:37 +0000 |
parents | a03c00e0dc04 |
children | 519983161a46 |
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. |
29594
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
69 ;; * Removed by Tomabechi 2000/06/10 * |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
70 ;; 'a chung must be explicitly typed as a vowel ("fa") |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
71 ;; $(7"A(B is now treated as normal base consonants |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
72 ;; (defconst tibetan-wylie-quote-alist '(("'" . ?$(7"A(B))) |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
73 |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
74 ;; Special alist to avoid default stacking. |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
75 (defconst tibetan-wylie-non-stacking-alist |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
76 '(("-d" . "$(7"2(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
77 ("-y" . "$(7"B(B"))) |
18968 | 78 |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
79 ;; Punctuations are not transcribed. |
18968 | 80 |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
81 (defconst tibetan-wylie-punctuation-alist |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
82 '(("." . " ") |
29594
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
83 (":" . "$(7"`(B") |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
84 (" " . "$(7!;(B") |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
85 ("/" . "$(7!=(B") |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
86 ("//" . "$(7!>(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
87 ("////" . ["$(7!>(B $(7!>(B"]) |
29594
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
88 ("$" . "$(7!?(B") |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
89 ("/\"" . "$(7!@(B") ; Not defined in Ext. Wylie. |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
90 ("&" . "$(7!@(B") |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
91 (";" . "$(7!A(B") |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
92 ("%" . "$(7!D(B") |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
93 ("!" . "$(7!8(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
94 ("<" . "$(7!l(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
95 (">" . "$(7!m(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
96 ("@" . "$(7"f(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
97 ("*" . ["$(7!4!5(B"]) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
98 ("#" . ["$(7!4!5!5(B"]) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
99 ("^" . "$(7!6(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
100 ("0" . "$(7!P(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
101 ("1" . "$(7!Q(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
102 ("2" . "$(7!R(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
103 ("3" . "$(7!S(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
104 ("4" . "$(7!T(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
105 ("5" . "$(7!U(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
106 ("6" . "$(7!V(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
107 ("7" . "$(7!W(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
108 ("8" . "$(7!X(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
109 ("9" . "$(7!Y(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
110 ("-0" . "$(7!c(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
111 ("-1" . "$(7!Z(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
112 ("-2" . "$(7![(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
113 ("-3" . "$(7!\(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
114 ("-4" . "$(7!](B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
115 ("-5" . "$(7!^(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
116 ("-6" . "$(7!_(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
117 ("-7" . "$(7!`(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
118 ("-8" . "$(7!a(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
119 ("-9" . "$(7!b(B") |
29594
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
120 ("|" . "$(7!0!1!2!3!7!9!:!B!C!E!F!G!H!I!J!K!L!M!N!O!d!f!h!j!k!n!o#O#P#Q#R#S#T#U#V#W#X#Y#Z#[#\#]#`(B"))) |
18968 | 121 |
122 (quail-define-package "tibetan-wylie" "Tibetan" "TIBw" t | |
123 "Tibetan character input by Extended Wylie key assignment. | |
124 | |
125 +-------------------------------------+ | |
29594
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
126 |$(7"!!;(B k |$(7""!;(B kh |$(7"#!;(B g |$(7"$!;(B gh |$(7"%!;(B ng| $(7"S(B i $(7!=(B / |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
127 |$(7"&!;(B c |$(7"'!;(B ch |$(7"(!;(B j | |$(7"*!;(B ny| $(7"U(B u $(7!>(B // |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
128 |$(7"+!;(B T |$(7",!;(B TH |$(7"-!;(B D |$(7".!;(B DH |$(7"/!;(B N | $(7"[(B e $(7!>(B $(7!>(B //// |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
129 |$(7"0!;(B t |$(7"1!;(B th |$(7"2!;(B d |$(7"3!;(B dh |$(7"4!;(B n | $(7"](B o $(7!A(B ; |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
130 |$(7"5!;(B p |$(7"6!;(B ph |$(7"7!;(B b |$(7"8!;(B bh |$(7"9!;(B m | $(7"\(B ai (ee, E) $(7!?(B $ |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
131 |$(7":!;(B ts|$(7";!;(B tsh|$(7"<!;(B dz |$(7"=!;(B dzh|$(7">!;(B w | $(7"^(B au (oo, O) $(7!@(B & |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
132 |$(7"?!;(B zh|$(7"@!;(B z |$(7"A!;(B ' | |$(7"B!;(B y | $(7"a(B I $(7!4!5(B * |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
133 |$(7"C!;(B r |$(7"D!;(B l |$(7"E!;(B sh |$(7"F!;(B SH |$(7"G!;(B s | $(7"`(B : $(7!4!5!5(B # |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
134 |$(7"H!;(B h |$(7"I!;(B A |$(7"J!;(B kSH| | | $(7"_(B M $(7!l(B $(7!m(B < > |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
135 +-------------------------------------+ $(7!D(B % |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
136 (The consonant $(7"I!;(B must be typed explicitly.) |
18968 | 137 |
138 NOT SPECIFIED IN EXT. WYLIE: | |
139 +--------------------------------------------------------+ | |
29594
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
140 |$(7"c(B = ~ |$(7"d(B = ` |$(7"e(B = , |$(7"f(B = @ |$(7!g(B = _o|$(7!e(B = _O|$(7!6(B = ^| |
18968 | 141 +--------------------------------------------------------+ |
142 |$(7"i(B = x |$(7"j(B = X |$(7"g(B = v |$(7"h(B = V |$(7"k(B = q |$(7"l(B = Q | | |
143 +-----------------------------------------------+ | |
144 | |
145 SPECIAL KEYS | |
146 + : Consonant Stacking | |
147 \(Consonant stacking for ordinary Tibetan is done automatically) | |
148 - : No Consonant Stacking | |
149 \(To suppress automatic stacking for \"g-y\", | |
150 and to get da-drag in -r-d, -l-d .) | |
151 | : Special signs. | |
152 | |
153 Tsheg is assigned to SPC. Space is assigned to period '.'. | |
154 " | |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
155 nil nil nil nil nil nil nil nil |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
156 'quail-tibetan-update-translation) |
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 ;; 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
|
159 ;; which can be one composition. |
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 ;; A Tibetan syllable is typically structured as follows: |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
162 ;; [P] C [c+] V [M] [S [s]] |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
163 ;; ^^^^^^^^^^^^ |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
164 ;; where P:prefix, C:base consonant, c:subjoined consonant, |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
165 ;; V:vowel, M:vowel modifier, S:suffix, s:post suffix. |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
166 ;; In this pattern, the part indicated by "^^^" can be one composition. |
18968 | 167 |
29594
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
168 ;;; modified by Tomabechi 1999/12/10 |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
169 ;;; modified by Tomabechi 2000/06/08 |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
170 ;;; Allows infinite addition of vowels/modifiers |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
171 ;;; as specified in Unicode v.3 |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
172 (quail-install-map |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
173 (quail-map-from-table |
29594
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
174 '((base-state (tibetan-consonant-transcription-alist . svm-state) |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
175 (tibetan-precomposed-transcription-alist . svm-state) |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
176 (tibetan-wylie-non-stacking-alist . svm-state) |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
177 tibetan-subjoined-transcription-alist |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
178 tibetan-vowel-transcription-alist |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
179 tibetan-modifier-transcription-alist |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
180 tibetan-wylie-punctuation-alist) |
29594
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
181 (svm-state ;;(tibetan-wylie-quote-alist . vm-state) |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
182 (tibetan-vowel-transcription-alist . vm-state) |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
183 (tibetan-subjoined-transcription-alist . svm-state) |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
184 (tibetan-modifier-transcription-alist . m-state)) |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
185 (vm-state (tibetan-vowel-transcription-alist . vm-state) |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
186 (tibetan-modifier-transcription-alist . m-state)) |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
187 (m-state (tibetan-modifier-transcription-alist . m-state))))) |
18968 | 188 |
189 ;;; | |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
190 ;;; TibKey key alignment based input method |
18968 | 191 ;;; |
192 | |
193 (defconst tibetan-tibkey-to-transcription-alist | |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
194 '(;; consonant |
18968 | 195 ("`" . "`") ; sna ldan |
196 ("~" . "~") ; sna ldan + nada | |
197 ("q" . "k") ; ka | |
198 ("Q" ."kSH") ; kSHa | |
199 ("w" . "kh") ; kha | |
200 ("e" . "g") ; ga | |
201 ("r" . "ng") ; nga | |
202 ("t" . "c") ; ca | |
203 ("T" . "I") ; gi gu log | |
204 ("y" . "ch") ; cha | |
205 ("u" . "j") ; ja | |
206 ("i" . "ny") ; nya | |
207 ("o" . "t") ; ta | |
208 ("O" . "T") ; Ta | |
209 ("p" . "th") ; tha | |
210 ("P" . "TH") ; THa | |
211 ("[" . "d") ; da | |
212 ("{" . "D") ; Da | |
213 ("]" . "n") ; na | |
214 ("}" . "N") ; Na | |
215 ("a" . "p") ; pa | |
216 ("A" . "a") ; Vowel a (not used in original TibKey) | |
217 ("s" . "ph") ; pha | |
218 ("d" . "b") ; ba | |
219 ("f" . "m") ; ma | |
220 ("F" . "M") ; anusvara | |
221 ("g" . "u") ; zhabs kyu | |
222 ("G" . "i") ; gi gu | |
223 ("H" . ",") ; viraama | |
224 ("j" . "o") ; naro | |
225 ("J" . "e") ; 'greng bu | |
226 ("k" . "ts") ; tsa | |
227 ("l" . "tsh") ; tsha | |
228 (";" . "dz") ; dza | |
229 ("'" . "w") ; wa | |
230 ("\"" . "+w") ; wa zur | |
231 ("z" . "zh") ; zha | |
232 ("x" . "z") ; za | |
233 ("c" . "'") ; 'a | |
234 ("C" . "+'") ; 'a chung | |
235 ("v" . "y") ; ya | |
236 ("V" . "+y") ; ya btags | |
237 ("b" . "r") ; ra | |
238 ("B" . "+r") ; ra btags | |
239 ("n" . "l") ; la | |
240 ("N" . "+l") ; la btags | |
241 ("m" . "sh") ; sha | |
242 ("M" . "SH") ; SHa | |
243 ("," . "s") ; sa | |
244 ("." . "h") ; ha | |
245 ("/" . "A") ; Aa | |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
246 ;; subjoined |
18968 | 247 ("hq" . "+k") ; ka |
248 ("hQ" ."+kSH") ; kSHa | |
249 ("hw" . "+kh") ; kha | |
250 ("he" . "+g") ; ga | |
251 ("hr" . "+ng") ; nga | |
252 ("ht" . "+c") ; ca | |
253 ("hy" . "+ch") ; cha | |
254 ("hu" . "+j") ; ja | |
255 ("hi" . "+ny") ; nya | |
256 ("ho" . "+t") ; ta | |
257 ("hO" . "+T") ; Ta | |
258 ("hp" . "+th") ; tha | |
259 ("hP" . "+TH") ; THa | |
260 ("h[" . "+d") ; da | |
261 ("h{" . "+D") ; Da | |
262 ("h]" . "+n") ; na | |
263 ("h}" . "+N") ; Na | |
264 ("ha" . "+p") ; pa | |
265 ("hs" . "+ph") ; pha | |
266 ("hd" . "+b") ; ba | |
267 ("hf" . "+m") ; ma | |
268 ("hk" . "+ts") ; tsa | |
269 ("hl" . "+tsh") ; tsha | |
270 ("h;" . "+dz") ; dza | |
271 ("h'" . "+w") ; wa | |
272 ("hz" . "+zh") ; zha | |
273 ("hx" . "+z") ; za | |
274 ("hc" . "+'") ; 'a | |
275 ("hv" . "+y") ; ya | |
276 ("hb" . "+r") ; ra | |
277 ("hn" . "+l") ; la | |
278 ("hm" . "+sh") ; sha | |
279 ("hM" . "+SH") ; SHa | |
280 ("h," . "+s") ; sa | |
281 ("h." . "+h") ; ha | |
282 ("h/" . "+A") ; Aa | |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
283 ;; Special rule for `$(7"B(B' to avoid stacking. |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
284 ("E" . "-y") |
18968 | 285 )) |
286 | |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
287 (defconst tibetan-consonant-tibkey-alist nil) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
288 (defconst tibetan-subjoined-tibkey-alist nil) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
289 (defconst tibetan-vowel-tibkey-alist nil) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
290 (defconst tibetan-modifier-tibkey-alist nil) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
291 (defconst tibetan-non-stacking-tibkey-alist nil) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
292 |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
293 (let ((type-list '("consonant" "subjoined" "vowel" "modifier" "non-stacking")) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
294 (tail tibetan-tibkey-to-transcription-alist) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
295 elt) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
296 (while tail |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
297 (setq elt (car tail) tail (cdr tail)) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
298 (let ((types type-list) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
299 type transcription trans-alist tibkey-alist) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
300 (while types |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
301 (setq type (car types) types (cdr types)) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
302 (setq trans-alist |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
303 (if (string= type "non-stacking") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
304 'tibetan-wylie-non-stacking-alist |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
305 (intern (format "tibetan-%s-transcription-alist" type))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
306 transcription |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
307 (cdr (assoc (cdr elt) (symbol-value trans-alist)))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
308 (when transcription |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
309 (setq tibkey-alist (intern (format "tibetan-%s-tibkey-alist" type))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
310 (set tibkey-alist |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
311 (cons (cons (car elt) transcription) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
312 (symbol-value tibkey-alist))))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
313 (or tibkey-alist |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
314 (error "No Tibetan transcription for %s" (cdr elt)))))) |
18968 | 315 |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
316 (defconst tibetan-punctuation-tibkey-alist |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
317 '(("1" . "$(7!Q(B") |
29594
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
318 ("!" . "$(7!4(B") ; nyi zla long |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
319 ("2" . "$(7!R(B") |
29594
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
320 ("@" . "$(7!5(B") ; nyi zla simple |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
321 ("3" . "$(7!S(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
322 ;;; ("#" ) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
323 ("4" . "$(7!T(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
324 ;;; ("$" ) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
325 ("5" . "$(7!U(B") |
29594
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
326 ("%" . "$(7!D(B") |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
327 ("6" . "$(7!V(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
328 ("^" . "$(7!1(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
329 ("7" . "$(7!W(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
330 ("8" . "$(7!X(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
331 ;;; ("*" ) ; avagraha, not supported yet |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
332 ("9" . "$(7!Y(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
333 ("(" . "$(7!l(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
334 ("0" . "$(7!P(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
335 (")" . "$(7!m(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
336 ;;; ("-" ) ; enphatic, not yet supported |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
337 ;;; ("_" ) ; id. |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
338 ;;; ("=" ) ; special sign, not yet supported |
29594
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
339 ("+" . "$(7!A(B") |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
340 ("\\" . "$(7!?(B") |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
341 ("|" . "$(7!8(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
342 ("I" . "$(7"f(B") ; avagraha |
29594
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
343 (":" . "$(7"`(B") |
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
344 ;;; (">" ?$(7!;(B) ; to be assigned to SPC |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
345 (">" . " ") |
29594
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
346 ("?" . "$(7!=(B") |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
347 ("??" . "$(7!>(B") |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
348 ("????" . ["$(7!>(B $(7!>(B"]) |
29594
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
349 (" " . "$(7!;(B") |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
350 )) |
18968 | 351 |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
352 ;; Convert TibKey string to Tibetan-Roman transcription string. |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
353 ;; If there's no proper conversion, return nil. |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
354 (defun quail-tibkey-to-transcription (tibkey) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
355 (let ((len (length tibkey)) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
356 (i 0) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
357 (trans-list nil)) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
358 (while (< i len) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
359 (let ((last len) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
360 trans) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
361 (while (and (not trans) (> last i)) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
362 (or (setq trans (cdr (assoc (substring tibkey i last) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
363 tibetan-tibkey-to-transcription-alist))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
364 (setq last (1- last)))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
365 (if trans |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
366 (setq trans-list (cons trans trans-list) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
367 i last) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
368 (setq trans-list nil i len)))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
369 (apply 'concat (nreverse trans-list)))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
370 |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
371 (defvar quail-tibkey-characters nil) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
372 |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
373 (defun quail-tibkey-update-translation (control-flag) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
374 (if (integerp control-flag) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
375 ;; Non-composable-character typed. |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
376 (setq quail-current-str |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
377 (buffer-substring (overlay-start quail-overlay) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
378 (overlay-end quail-overlay)) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
379 unread-command-events |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
380 (string-to-list |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
381 (substring quail-current-key control-flag))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
382 (let ((transcription (quail-tibkey-to-transcription quail-current-key))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
383 (if (> (length transcription) 0) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
384 (let ((quail-current-key transcription)) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
385 (setq control-flag |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
386 (quail-tibetan-update-translation control-flag))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
387 (or quail-current-str |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
388 (setq quail-current-str quail-current-key))))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
389 control-flag) |
18968 | 390 |
391 (quail-define-package "tibetan-tibkey" "Tibetan" "TIBt" t | |
392 "Tibetan character input by TibKey key assignment. | |
393 | |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
394 \(This implementation is still incomplete. |
18968 | 395 Therefore, the following key assignment is a provisional one.) |
396 | |
397 [NOT SHIFTED] | |
398 | |
399 +-------------------------------------------------------+ | |
400 |`$(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| | |
401 +-------------------------------------------------------+ | |
402 |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| | |
403 +-----------------------------------------------+ | |
404 |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| | |
405 +---------------------------------------------+ | |
406 |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| | |
407 +---------------------------------------+ | |
408 The key 'h' is used for consonant stacking. | |
409 | |
410 [SHIFTED] | |
411 | |
412 +----------------------------------------------------------+ | |
29594
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
413 |~$(7"c(B|!$(7!4(B|@$(7!5(B|# |$ |%$(7!D(B |^$(7!1(B|& |* |($(7!l(B|)$(7!m(B|_ |+$(7!A(B| |$(7!8(B| |
18968 | 414 +----------------------------------------------------------+ |
29594
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
415 |Q$(7"J(B|W |E |R |T$(7"a(B|Y |U |I$(7"f(B|O$(7"+(B|P$(7",(B|{$(7"-(B|}$(7"/(B| |
18968 | 416 +-----------------------------------------------+ |
417 |A |S |D |F$(7"_(B|G$(7"S(B|H$(7"e(B|J$(7"[(B|K |L |:$(7"`(B|\"$(7#>(B| | |
418 +-------------------------------------------+ | |
29594
a03c00e0dc04
(tibetan-wylie-quote-alist): This variable deleted.
Kenichi Handa <handa@m17n.org>
parents:
26881
diff
changeset
|
419 |Z |X |C$(7"R(B|V$(7#B(B|B$(7#C(B|N$(7#D(B|M$(7"F(B|< |> |?$(7!=(B | |
18968 | 420 +---------------------------------------+ |
421 | |
422 DIFFERENCE FROM THE ORIGINAL TIBKEY: | |
423 | |
424 1. Vowel 'a' should be typed explicitly by the key 'A'. | |
425 This is really inconvenient. But to make the coding | |
426 scheme clear, it is desirable to have an explicite | |
427 vowel sign for 'a'. | |
428 2. Tsheg is assigned to SPC key. You can input a space | |
429 by typing '>'. | |
430 4. To avoid the default stacking $(7$B(B and to obtain $(7"#"B(B, | |
431 type 'E' instead of 'v' (=$(7"B(B). | |
432 3. There are many characters that are not supported in the | |
433 current implementation (especially special signs). I hope | |
434 I'll complete in a future revision. | |
435 " | |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
436 nil nil nil nil nil nil nil nil |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
437 'quail-tibkey-update-translation) |
18968 | 438 |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
439 (quail-install-map |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
440 (quail-map-from-table |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
441 '((base-state (tibetan-consonant-tibkey-alist . s-state) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
442 (tibetan-non-stacking-tibkey-alist . s-state) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
443 tibetan-subjoined-tibkey-alist |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
444 tibetan-vowel-tibkey-alist |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
445 tibetan-modifier-tibkey-alist |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
446 tibetan-punctuation-tibkey-alist) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
447 (s-state (tibetan-subjoined-tibkey-alist . s-state) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
448 (tibetan-vowel-tibkey-alist . m-state)) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
23170
diff
changeset
|
449 (m-state tibetan-modifier-tibkey-alist)))) |