Mercurial > emacs
annotate leim/quail/thai.el @ 90473:9c75458ea910
(xftfont_open): For generating a name, start from
96-byte buffer.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Mon, 19 Jun 2006 01:32:49 +0000 |
parents | 7beb78bc1f8e |
children | 6588c6259dfb |
rev | line source |
---|---|
88610 | 1 ;;; thai.el --- Quail package for inputting Thai characters -*-coding: iso-2022-7bit;-*- |
18673 | 2 |
67657 | 3 ;; Copyright (C) 1995, 1997, 1999, 2005 |
60704
7c239dedaeea
(quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents:
60606
diff
changeset
|
4 ;; 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
|
5 ;; Registration Number H14PRO021 |
18673 | 6 |
7 ;; Keywords: multilingual, input method, Thai | |
8 | |
9 ;; This file is part of GNU Emacs. | |
10 | |
11 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
12 ;; it under the terms of the GNU General Public License as published by | |
13 ;; the Free Software Foundation; either version 2, or (at your option) | |
14 ;; any later version. | |
15 | |
16 ;; GNU Emacs is distributed in the hope that it will be useful, | |
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 ;; GNU General Public License for more details. | |
20 | |
21 ;; You should have received a copy of the GNU General Public License | |
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
64083 | 23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
24 ;; Boston, MA 02110-1301, USA. | |
18673 | 25 |
38453
519983161a46
Some fixes to follow lisp coding conventions and typo fixes.
Pavel Janík <Pavel@Janik.cz>
parents:
31431
diff
changeset
|
26 ;;; Commentary: |
519983161a46
Some fixes to follow lisp coding conventions and typo fixes.
Pavel Janík <Pavel@Janik.cz>
parents:
31431
diff
changeset
|
27 |
18673 | 28 ;;; Code: |
29 | |
30 (require 'quail) | |
31 | |
60704
7c239dedaeea
(quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents:
60606
diff
changeset
|
32 (defmacro thai-generate-quail-map (translation-table) |
7c239dedaeea
(quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents:
60606
diff
changeset
|
33 (let (map) |
7c239dedaeea
(quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents:
60606
diff
changeset
|
34 (dotimes (i (length translation-table)) |
7c239dedaeea
(quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents:
60606
diff
changeset
|
35 (let ((trans (aref translation-table i))) |
7c239dedaeea
(quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents:
60606
diff
changeset
|
36 (when (not (eq trans 0)) |
7c239dedaeea
(quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents:
60606
diff
changeset
|
37 (if (> (length trans) 1) |
7c239dedaeea
(quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents:
60606
diff
changeset
|
38 (setq trans (vector trans)) |
7c239dedaeea
(quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents:
60606
diff
changeset
|
39 (setq trans (aref trans 0))) |
7c239dedaeea
(quail-thai-update-translation): Delete it.
Kenichi Handa <handa@m17n.org>
parents:
60606
diff
changeset
|
40 (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
|
41 `(quail-define-rules ,@map))) |
18673 | 42 |
43 ;; Thai Kesmanee keyboard support. | |
44 | |
45 (quail-define-package | |
46 "thai-kesmanee" "Thai" ",T!!(B>" t | |
47 "Thai Kesmanee input method with TIS620 keyboard layout | |
48 | |
49 The difference from the ordinal Thai keyboard: | |
50 ',T_(B' and ',To(B' are assigned to '\\' and '|' respectively, | |
51 ',T#(B' and ',T%(B' are assigned to '`' and '~' respectively, | |
52 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
|
53 nil t t t t nil nil nil nil nil t) |
18673 | 54 |
89287 | 55 (thai-generate-quail-map |
56 [ | |
57 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; control codes | |
58 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
|
59 ;; This data is quite old. |
90127
30ad2795fdab
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-28
Miles Bader <miles@gnu.org>
diff
changeset
|
60 ;; 0 "#" "." ",Tr(B" ",Ts(B" ",Tt(B" ",TQi(B" ",T'(B" ; SPC .. ' |
30ad2795fdab
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-28
Miles Bader <miles@gnu.org>
diff
changeset
|
61 ;; ",Tv(B" ",Tw(B" ",Tu(B" ",Ty(B" ",TA(B" ",T"(B" ",Tc(B" ",T=(B" ; ( .. / |
30ad2795fdab
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-28
Miles Bader <miles@gnu.org>
diff
changeset
|
62 ;; ",T((B" ",TE(B" "/" "_" ",T@(B" ",T6(B" ",TX(B" ",TV(B" ; 0 .. 7 |
30ad2795fdab
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-28
Miles Bader <miles@gnu.org>
diff
changeset
|
63 ;; ",T$(B" ",T5(B" ",T+(B" ",TG(B" ",T2(B" ",T*(B" ",TL(B" ",TF(B" ; 8 .. ? |
30ad2795fdab
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-28
Miles Bader <miles@gnu.org>
diff
changeset
|
64 ;; ",Tq(B" ",TD(B" ",TZ(B" ",T)(B" ",T/(B" ",T.(B" ",Tb(B" ",T,(B" ; @ .. G |
30ad2795fdab
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-28
Miles Bader <miles@gnu.org>
diff
changeset
|
65 ;; ",Tg(B" ",T3(B" ",Tk(B" ",TI(B" ",TH(B" ",Tn(B" ",Tl(B" ",TO(B" ; H .. O |
30ad2795fdab
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-28
Miles Bader <miles@gnu.org>
diff
changeset
|
66 ;; ",T-(B" ",Tp(B" ",T1(B" ",T&(B" ",T8(B" ",Tj(B" ",TN(B" "\"" ; P .. W |
30ad2795fdab
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-28
Miles Bader <miles@gnu.org>
diff
changeset
|
67 ;; ")" ",Tm(B" "(" ",T:(B" ",T_(B" ",TE(B" ",TY(B" ",Tx(B" ; X .. _ |
30ad2795fdab
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-28
Miles Bader <miles@gnu.org>
diff
changeset
|
68 ;; ",T#(B" ",T?(B" ",TT(B" ",Ta(B" ",T!(B" ",TS(B" ",T4(B" ",T`(B" ; ` .. g |
30ad2795fdab
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-28
Miles Bader <miles@gnu.org>
diff
changeset
|
69 ;; ",Ti(B" ",TC(B" ",Th(B" ",TR(B" ",TJ(B" ",T7(B" ",TW(B" ",T9(B" ; h .. o |
30ad2795fdab
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-28
Miles Bader <miles@gnu.org>
diff
changeset
|
70 ;; ",TB(B" ",Tf(B" ",T>(B" ",TK(B" ",TP(B" ",TU(B" ",TM(B" ",Td(B" ; p .. w |
30ad2795fdab
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-28
Miles Bader <miles@gnu.org>
diff
changeset
|
71 ;; ",T;(B" ",TQ(B" ",T<(B" ",T0(B" ",To(B" "," ",T%(B" 0 ; x .. DEL |
60605
600e9d5b46cc
(thai-generate-quail-map): Fix the kesmanee layout.
Kenichi Handa <handa@m17n.org>
parents:
52401
diff
changeset
|
72 ;; This is the correct data nowadays. |
90127
30ad2795fdab
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-28
Miles Bader <miles@gnu.org>
diff
changeset
|
73 0 "+" "." ",Tr(B" ",Ts(B" ",Tt(B" ",T_(B" ",T'(B" ; SPC .. ' |
89287 | 74 ",Tv(B" ",Tw(B" ",Tu(B" ",Ty(B" ",TA(B" ",T"(B" ",Tc(B" ",T=(B" ; ( .. / |
90127
30ad2795fdab
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-28
Miles Bader <miles@gnu.org>
diff
changeset
|
75 ",T((B" ",Te(B" "/" "-" ",T@(B" ",T6(B" ",TX(B" ",TV(B" ; 0 .. 7 |
89287 | 76 ",T$(B" ",T5(B" ",T+(B" ",TG(B" ",T2(B" ",T*(B" ",TL(B" ",TF(B" ; 8 .. ? |
77 ",Tq(B" ",TD(B" ",TZ(B" ",T)(B" ",T/(B" ",T.(B" ",Tb(B" ",T,(B" ; @ .. G | |
90127
30ad2795fdab
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-28
Miles Bader <miles@gnu.org>
diff
changeset
|
78 ",Tg(B" ",T3(B" ",Tk(B" ",TI(B" ",TH(B" "?" ",Tl(B" ",TO(B" ; H .. O |
89287 | 79 ",T-(B" ",Tp(B" ",T1(B" ",T&(B" ",T8(B" ",Tj(B" ",TN(B" "\"" ; P .. W |
90127
30ad2795fdab
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-28
Miles Bader <miles@gnu.org>
diff
changeset
|
80 "\)" ",Tm(B" "\(" ",T:(B" ",T#(B" ",TE(B" ",TY(B" ",Tx(B" ; X .. _ |
30ad2795fdab
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-28
Miles Bader <miles@gnu.org>
diff
changeset
|
81 "_" ",T?(B" ",TT(B" ",Ta(B" ",T!(B" ",TS(B" ",T4(B" ",T`(B" ; ` .. g |
89287 | 82 ",Ti(B" ",TC(B" ",Th(B" ",TR(B" ",TJ(B" ",T7(B" ",TW(B" ",T9(B" ; h .. o |
83 ",TB(B" ",Tf(B" ",T>(B" ",TK(B" ",TP(B" ",TU(B" ",TM(B" ",Td(B" ; p .. w | |
90127
30ad2795fdab
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-28
Miles Bader <miles@gnu.org>
diff
changeset
|
84 ",T;(B" ",TQ(B" ",T<(B" ",T0(B" ",T%(B" "," "%" 0 ; x .. DEL |
89287 | 85 ]) |
18673 | 86 |
87 | |
88 ;; Thai Pattachote keyboard support. | |
89 | |
90 (quail-define-package | |
91 "thai-pattachote" "Thai" ",T!;(B>" t | |
92 "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
|
93 nil t t t t nil nil nil nil nil t) |
18673 | 94 |
89287 | 95 (thai-generate-quail-map |
96 [ | |
97 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; control codes | |
98 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; control codes | |
89483 | 99 0 "+" ",T1(B" "/" "," "?" "_" ",T"(B" ; SPC .. ' |
89287 | 100 "(" ")" "." "%" ",TP(B" ",Tq(B" ",T((B" ",T>(B" ; ( .. / |
101 ",Tp(B" "=" ",Tr(B" ",Ts(B" ",Tt(B" ",Tu(B" ",TY(B" ",Tw(B" ; 0 .. 7 | |
102 ",Tx(B" ",Ty(B" ",T&(B" ",Td(B" ",T?(B" ",Tv(B" ",T2(B" ",TL(B" ; 8 .. ? | |
103 "\"" ",Tk(B" ",TQ(B" ",T0(B" ",TS(B" ",Tf(B" ",T3(B" ",Tl(B" ; @ .. G | |
104 ",TW(B" ",T+(B" ",T<(B" ",T*(B" ",Tb(B" ",TN(B" ",TH(B" ",T6(B" ; H .. O | |
105 ",T2(B" ",Tj(B" ",T-(B" ",T8(B" ",TI(B" ",T=(B" ",T@(B" ",TD(B" ; P .. W | |
106 ",T.(B" ",TV(B" ",T.(B" ",Tc(B" ",TZ(B" ",T2(B" ",TX(B" "-" ; X .. _ | |
107 ",T#(B" ",Ti(B" ",TT(B" ",TE(B" ",T'(B" ",TB(B" ",T!(B" ",TQ(B" ; ` .. g | |
108 ",TU(B" ",TA(B" ",TR(B" ",T9(B" ",T`(B" ",TJ(B" ",T$(B" ",TG(B" ; h .. o | |
109 ",Ta(B" ",Tg(B" ",TM(B" ",T7(B" ",TC(B" ",T4(B" ",TK(B" ",T5(B" ; p .. w | |
110 ",T;(B" ",Th(B" ",T:(B" ",TO(B" ",Tm(B" ",TF(B" ",T%(B" 0 ; x .. DEL | |
111 ]) | |
38453
519983161a46
Some fixes to follow lisp coding conventions and typo fixes.
Pavel Janík <Pavel@Janik.cz>
parents:
31431
diff
changeset
|
112 |
52401 | 113 ;;; 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
|
114 ;;; thai.el ends here |