Mercurial > emacs
annotate leim/quail/thai.el @ 63047:916f1679ae7e
Change NBSP to space. Move coding cookie from the
second line to Local Variables. Fix title line.
author | Juri Linkov <juri@jurta.org> |
---|---|
date | Mon, 06 Jun 2005 11:49:52 +0000 |
parents | 7c239dedaeea |
children | 23a17af379b1 30ad2795fdab |
rev | line source |
---|---|
38453
519983161a46
Some fixes to follow lisp coding conventions and typo fixes.
Pavel Janík <Pavel@Janik.cz>
parents:
31431
diff
changeset
|
1 ;;; thai.el --- Quail package for inputting Thai characters |
18673 | 2 |
3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. | |
4 ;; Licensed to the Free Software Foundation. | |
60704
7c239dedaeea
(quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents:
60606
diff
changeset
|
5 ;; Copyright (C) 2005 |
7c239dedaeea
(quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents:
60606
diff
changeset
|
6 ;; National Institute of Advanced Industrial Science and Technology (AIST) |
7c239dedaeea
(quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents:
60606
diff
changeset
|
7 ;; Registration Number H14PRO021 |
18673 | 8 |
9 ;; Keywords: multilingual, input method, Thai | |
10 | |
11 ;; This file is part of GNU Emacs. | |
12 | |
13 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
14 ;; it under the terms of the GNU General Public License as published by | |
15 ;; the Free Software Foundation; either version 2, or (at your option) | |
16 ;; any later version. | |
17 | |
18 ;; GNU Emacs is distributed in the hope that it will be useful, | |
19 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 ;; GNU General Public License for more details. | |
22 | |
23 ;; You should have received a copy of the GNU General Public License | |
24 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
25 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
26 ;; Boston, MA 02111-1307, USA. | |
27 | |
38453
519983161a46
Some fixes to follow lisp coding conventions and typo fixes.
Pavel Janík <Pavel@Janik.cz>
parents:
31431
diff
changeset
|
28 ;;; Commentary: |
519983161a46
Some fixes to follow lisp coding conventions and typo fixes.
Pavel Janík <Pavel@Janik.cz>
parents:
31431
diff
changeset
|
29 |
18673 | 30 ;;; Code: |
31 | |
32 (require 'quail) | |
33 (require 'thai-util) | |
34 | |
60704
7c239dedaeea
(quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents:
60606
diff
changeset
|
35 (defmacro thai-generate-quail-map (translation-table) |
7c239dedaeea
(quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents:
60606
diff
changeset
|
36 (let (map) |
7c239dedaeea
(quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents:
60606
diff
changeset
|
37 (dotimes (i (length translation-table)) |
7c239dedaeea
(quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents:
60606
diff
changeset
|
38 (let ((trans (aref translation-table i))) |
7c239dedaeea
(quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents:
60606
diff
changeset
|
39 (when (not (eq trans 0)) |
7c239dedaeea
(quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents:
60606
diff
changeset
|
40 (if (> (length trans) 1) |
7c239dedaeea
(quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents:
60606
diff
changeset
|
41 (setq trans (vector trans)) |
7c239dedaeea
(quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents:
60606
diff
changeset
|
42 (setq trans (aref trans 0))) |
7c239dedaeea
(quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents:
60606
diff
changeset
|
43 (setq map (cons (list (char-to-string i) trans) map))))) |
7c239dedaeea
(quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents:
60606
diff
changeset
|
44 `(quail-define-rules ,@map))) |
18673 | 45 |
46 ;; Thai Kesmanee keyboard support. | |
47 | |
48 (quail-define-package | |
49 "thai-kesmanee" "Thai" ",T!!(B>" t | |
50 "Thai Kesmanee input method with TIS620 keyboard layout | |
51 | |
52 The difference from the ordinal Thai keyboard: | |
53 ',T_(B' and ',To(B' are assigned to '\\' and '|' respectively, | |
54 ',T#(B' and ',T%(B' are assigned to '`' and '~' respectively, | |
55 Don't know where to assign characters ',Tz(B' and ',T{(B'." | |
60704
7c239dedaeea
(quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents:
60606
diff
changeset
|
56 nil t t t t nil nil nil nil nil t) |
18673 | 57 |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
47241
diff
changeset
|
58 (quail-install-map |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
19722
diff
changeset
|
59 (thai-generate-quail-map |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
19722
diff
changeset
|
60 [ |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
19722
diff
changeset
|
61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; control codes |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
19722
diff
changeset
|
62 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; control codes |
60605
600e9d5b46cc
(thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents:
52401
diff
changeset
|
63 ;; This data is quite old. |
600e9d5b46cc
(thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents:
52401
diff
changeset
|
64 ;; 0 "#" "." ",Tr(B" ",Ts(B" ",Tt(B" ",TQi(B" ",T'(B" ; SPC .. ' |
600e9d5b46cc
(thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents:
52401
diff
changeset
|
65 ;; ",Tv(B" ",Tw(B" ",Tu(B" ",Ty(B" ",TA(B" ",T"(B" ",Tc(B" ",T=(B" ; ( .. / |
600e9d5b46cc
(thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents:
52401
diff
changeset
|
66 ;; ",T((B" ",TE(B" "/" "_" ",T@(B" ",T6(B" ",TX(B" ",TV(B" ; 0 .. 7 |
600e9d5b46cc
(thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents:
52401
diff
changeset
|
67 ;; ",T$(B" ",T5(B" ",T+(B" ",TG(B" ",T2(B" ",T*(B" ",TL(B" ",TF(B" ; 8 .. ? |
600e9d5b46cc
(thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents:
52401
diff
changeset
|
68 ;; ",Tq(B" ",TD(B" ",TZ(B" ",T)(B" ",T/(B" ",T.(B" ",Tb(B" ",T,(B" ; @ .. G |
600e9d5b46cc
(thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents:
52401
diff
changeset
|
69 ;; ",Tg(B" ",T3(B" ",Tk(B" ",TI(B" ",TH(B" ",Tn(B" ",Tl(B" ",TO(B" ; H .. O |
600e9d5b46cc
(thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents:
52401
diff
changeset
|
70 ;; ",T-(B" ",Tp(B" ",T1(B" ",T&(B" ",T8(B" ",Tj(B" ",TN(B" "\"" ; P .. W |
600e9d5b46cc
(thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents:
52401
diff
changeset
|
71 ;; ")" ",Tm(B" "(" ",T:(B" ",T_(B" ",TE(B" ",TY(B" ",Tx(B" ; X .. _ |
600e9d5b46cc
(thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents:
52401
diff
changeset
|
72 ;; ",T#(B" ",T?(B" ",TT(B" ",Ta(B" ",T!(B" ",TS(B" ",T4(B" ",T`(B" ; ` .. g |
600e9d5b46cc
(thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents:
52401
diff
changeset
|
73 ;; ",Ti(B" ",TC(B" ",Th(B" ",TR(B" ",TJ(B" ",T7(B" ",TW(B" ",T9(B" ; h .. o |
600e9d5b46cc
(thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents:
52401
diff
changeset
|
74 ;; ",TB(B" ",Tf(B" ",T>(B" ",TK(B" ",TP(B" ",TU(B" ",TM(B" ",Td(B" ; p .. w |
600e9d5b46cc
(thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents:
52401
diff
changeset
|
75 ;; ",T;(B" ",TQ(B" ",T<(B" ",T0(B" ",To(B" "," ",T%(B" 0 ; x .. DEL |
600e9d5b46cc
(thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents:
52401
diff
changeset
|
76 ;; This is the correct data nowadays. |
600e9d5b46cc
(thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents:
52401
diff
changeset
|
77 0 "+" "." ",Tr(B" ",Ts(B" ",Tt(B" ",T_(B" ",T'(B" ; SPC .. ' |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
19722
diff
changeset
|
78 ",Tv(B" ",Tw(B" ",Tu(B" ",Ty(B" ",TA(B" ",T"(B" ",Tc(B" ",T=(B" ; ( .. / |
60605
600e9d5b46cc
(thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents:
52401
diff
changeset
|
79 ",T((B" ",Te(B" "/" "-" ",T@(B" ",T6(B" ",TX(B" ",TV(B" ; 0 .. 7 |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
19722
diff
changeset
|
80 ",T$(B" ",T5(B" ",T+(B" ",TG(B" ",T2(B" ",T*(B" ",TL(B" ",TF(B" ; 8 .. ? |
60606 | 81 ",Tq(B" ",TD(B" ",TZ(B" ",T)(B" ",T/(B" ",T.(B" ",Tb(B" ",T,(B" ; @ .. G |
82 ",Tg(B" ",T3(B" ",Tk(B" ",TI(B" ",TH(B" "?" ",Tl(B" ",TO(B" ; H .. O | |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
19722
diff
changeset
|
83 ",T-(B" ",Tp(B" ",T1(B" ",T&(B" ",T8(B" ",Tj(B" ",TN(B" "\"" ; P .. W |
60606 | 84 "\)" ",Tm(B" "\(" ",T:(B" ",T#(B" ",TE(B" ",TY(B" ",Tx(B" ; X .. _ |
85 "_" ",T?(B" ",TT(B" ",Ta(B" ",T!(B" ",TS(B" ",T4(B" ",T`(B" ; ` .. g | |
86 ",Ti(B" ",TC(B" ",Th(B" ",TR(B" ",TJ(B" ",T7(B" ",TW(B" ",T9(B" ; h .. o | |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
19722
diff
changeset
|
87 ",TB(B" ",Tf(B" ",T>(B" ",TK(B" ",TP(B" ",TU(B" ",TM(B" ",Td(B" ; p .. w |
60606 | 88 ",T;(B" ",TQ(B" ",T<(B" ",T0(B" ",T%(B" "," "%" 0 ; x .. DEL |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
19722
diff
changeset
|
89 ])) |
18673 | 90 |
91 | |
92 | |
93 ;; Thai Pattachote keyboard support. | |
94 | |
95 (quail-define-package | |
96 "thai-pattachote" "Thai" ",T!;(B>" t | |
97 "Thai Pattachote input method with TIS620 keyboard layout" | |
60704
7c239dedaeea
(quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents:
60606
diff
changeset
|
98 nil t t t t nil nil nil nil nil t) |
18673 | 99 |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
47241
diff
changeset
|
100 (quail-install-map |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
19722
diff
changeset
|
101 (thai-generate-quail-map |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
19722
diff
changeset
|
102 [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; control codes |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
19722
diff
changeset
|
103 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; control codes |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
19722
diff
changeset
|
104 0 "+" ",T1(B" "/" "," "?" "_" ",T"(B" ; SPC .. ' |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
19722
diff
changeset
|
105 "(" ")" "." "%" ",TP(B" ",Tq(B" ",T((B" ",T>(B" ; ( .. / |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
19722
diff
changeset
|
106 ",Tp(B" "=" ",Tr(B" ",Ts(B" ",Tt(B" ",Tu(B" ",TY(B" ",Tw(B" ; 0 .. 7 |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
19722
diff
changeset
|
107 ",Tx(B" ",Ty(B" ",T&(B" ",Td(B" ",T?(B" ",Tv(B" ",T2(B" ",TL(B" ; 8 .. ? |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
19722
diff
changeset
|
108 "\"" ",Tk(B" ",TQ(B" ",T0(B" ",TS(B" ",Tf(B" ",T3(B" ",Tl(B" ; @ .. G |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
19722
diff
changeset
|
109 ",TW(B" ",T+(B" ",T<(B" ",T*(B" ",Tb(B" ",TN(B" ",TH(B" ",T6(B" ; H .. O |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
19722
diff
changeset
|
110 ",T2(B" ",Tj(B" ",T-(B" ",T8(B" ",TI(B" ",T=(B" ",T@(B" ",TD(B" ; P .. W |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
19722
diff
changeset
|
111 ",T.(B" ",TV(B" ",T.(B" ",Tc(B" ",TZ(B" ",T2(B" ",TX(B" "-" ; X .. _ |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
19722
diff
changeset
|
112 ",T#(B" ",Ti(B" ",TT(B" ",TE(B" ",T'(B" ",TB(B" ",T!(B" ",TQ(B" ; ` .. g |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
19722
diff
changeset
|
113 ",TU(B" ",TA(B" ",TR(B" ",T9(B" ",T`(B" ",TJ(B" ",T$(B" ",TG(B" ; h .. o |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
19722
diff
changeset
|
114 ",Ta(B" ",Tg(B" ",TM(B" ",T7(B" ",TC(B" ",T4(B" ",TK(B" ",T5(B" ; p .. w |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
19722
diff
changeset
|
115 ",T;(B" ",Th(B" ",T:(B" ",TO(B" ",Tm(B" ",TF(B" ",T%(B" 0 ; x .. DEL |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
19722
diff
changeset
|
116 ])) |
38453
519983161a46
Some fixes to follow lisp coding conventions and typo fixes.
Pavel Janík <Pavel@Janik.cz>
parents:
31431
diff
changeset
|
117 |
52401 | 118 ;;; arch-tag: fed6c468-0616-44b0-88bf-47347bf64825 |
38453
519983161a46
Some fixes to follow lisp coding conventions and typo fixes.
Pavel Janík <Pavel@Janik.cz>
parents:
31431
diff
changeset
|
119 ;;; thai.el ends here |