annotate leim/quail/thai.el @ 89708:b66b529d5f33

(x_set_mouse_face_gc): Call FACE_FOR_CHAR with POS and OBJECT args.
author Kenichi Handa <handa@m17n.org>
date Thu, 15 Jan 2004 06:57:45 +0000
parents 2f877ed80fa6
children 68c22ea6027c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
88610
bc5a086f9455 Add coding tag.
Dave Love <fx@gnu.org>
parents: 38453
diff changeset
1 ;;; thai.el --- Quail package for inputting Thai characters -*-coding: iso-2022-7bit;-*-
18673
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
2
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
4 ;; Licensed to the Free Software Foundation.
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
5
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
6 ;; Keywords: multilingual, input method, Thai
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
7
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
8 ;; This file is part of GNU Emacs.
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
9
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
11 ;; it under the terms of the GNU General Public License as published by
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
12 ;; the Free Software Foundation; either version 2, or (at your option)
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
13 ;; any later version.
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
14
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
15 ;; GNU Emacs is distributed in the hope that it will be useful,
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
18 ;; GNU General Public License for more details.
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
19
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
20 ;; You should have received a copy of the GNU General Public License
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
23 ;; Boston, MA 02111-1307, USA.
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
24
38453
519983161a46 Some fixes to follow lisp coding conventions and typo fixes.
Pavel Janík <Pavel@Janik.cz>
parents: 31431
diff changeset
25 ;;; Commentary:
519983161a46 Some fixes to follow lisp coding conventions and typo fixes.
Pavel Janík <Pavel@Janik.cz>
parents: 31431
diff changeset
26
18673
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
27 ;;; Code:
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
28
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
29 (require 'quail)
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
30
89287
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
31 (defmacro thai-generate-quail-map (translation-table)
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
32 (let (map)
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
33 (dotimes (i (length translation-table))
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
34 (let ((trans (aref translation-table i)))
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
35 (when (not (eq trans 0))
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
36 (if (> (length trans) 1)
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
37 (setq trans (vector trans))
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
38 (setq trans (aref trans 0)))
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
39 (setq map (cons (list (char-to-string i) trans) map)))))
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
40 `(quail-define-rules ,@map)))
18673
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
41
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
42 ;; Thai Kesmanee keyboard support.
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
43
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
44 (quail-define-package
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
45 "thai-kesmanee" "Thai" ",T!!(B>" t
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
46 "Thai Kesmanee input method with TIS620 keyboard layout
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
47
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
48 The difference from the ordinal Thai keyboard:
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
49 ',T_(B' and ',To(B' are assigned to '\\' and '|' respectively,
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
50 ',T#(B' and ',T%(B' are assigned to '`' and '~' respectively,
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
51 Don't know where to assign characters ',Tz(B' and ',T{(B'."
89287
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
52 nil t t t t nil nil nil nil nil t)
18673
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
53
89287
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
54 (thai-generate-quail-map
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
55 [
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
56 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; control codes
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
57 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; control codes
89483
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89287
diff changeset
58 0 "#" "." ",Tr(B" ",Ts(B" ",Tt(B" ",TQi(B" ",T'(B" ; SPC .. '
89287
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
59 ",Tv(B" ",Tw(B" ",Tu(B" ",Ty(B" ",TA(B" ",T"(B" ",Tc(B" ",T=(B" ; ( .. /
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
60 ",T((B" ",TE(B" "/" "_" ",T@(B" ",T6(B" ",TX(B" ",TV(B" ; 0 .. 7
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
61 ",T$(B" ",T5(B" ",T+(B" ",TG(B" ",T2(B" ",T*(B" ",TL(B" ",TF(B" ; 8 .. ?
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
62 ",Tq(B" ",TD(B" ",TZ(B" ",T)(B" ",T/(B" ",T.(B" ",Tb(B" ",T,(B" ; @ .. G
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
63 ",Tg(B" ",T3(B" ",Tk(B" ",TI(B" ",TH(B" ",Tn(B" ",Tl(B" ",TO(B" ; H .. O
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
64 ",T-(B" ",Tp(B" ",T1(B" ",T&(B" ",T8(B" ",Tj(B" ",TN(B" "\"" ; P .. W
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
65 ")" ",Tm(B" "(" ",T:(B" ",T_(B" ",TE(B" ",TY(B" ",Tx(B" ; X .. _
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
66 ",T#(B" ",T?(B" ",TT(B" ",Ta(B" ",T!(B" ",TS(B" ",T4(B" ",T`(B" ; ` .. g
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
67 ",Ti(B" ",TC(B" ",Th(B" ",TR(B" ",TJ(B" ",T7(B" ",TW(B" ",T9(B" ; h .. o
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
68 ",TB(B" ",Tf(B" ",T>(B" ",TK(B" ",TP(B" ",TU(B" ",TM(B" ",Td(B" ; p .. w
89483
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89287
diff changeset
69 ",T;(B" ",TQ(B" ",T<(B" ",T0(B" ",To(B" "," ",T%(B" 0 ; x .. DEL
89287
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
70 ])
18673
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
71
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
72
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
73 ;; Thai Pattachote keyboard support.
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
74
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
75 (quail-define-package
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
76 "thai-pattachote" "Thai" ",T!;(B>" t
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
77 "Thai Pattachote input method with TIS620 keyboard layout"
89287
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
78 nil t t t t nil nil nil nil nil t)
18673
751941736224 Initial revision
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
79
89287
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
80 (thai-generate-quail-map
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
81 [
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
82 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; control codes
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
83 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; control codes
89483
2f877ed80fa6 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 88123 89287
diff changeset
84 0 "+" ",T1(B" "/" "," "?" "_" ",T"(B" ; SPC .. '
89287
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
85 "(" ")" "." "%" ",TP(B" ",Tq(B" ",T((B" ",T>(B" ; ( .. /
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
86 ",Tp(B" "=" ",Tr(B" ",Ts(B" ",Tt(B" ",Tu(B" ",TY(B" ",Tw(B" ; 0 .. 7
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
87 ",Tx(B" ",Ty(B" ",T&(B" ",Td(B" ",T?(B" ",Tv(B" ",T2(B" ",TL(B" ; 8 .. ?
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
88 "\"" ",Tk(B" ",TQ(B" ",T0(B" ",TS(B" ",Tf(B" ",T3(B" ",Tl(B" ; @ .. G
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
89 ",TW(B" ",T+(B" ",T<(B" ",T*(B" ",Tb(B" ",TN(B" ",TH(B" ",T6(B" ; H .. O
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
90 ",T2(B" ",Tj(B" ",T-(B" ",T8(B" ",TI(B" ",T=(B" ",T@(B" ",TD(B" ; P .. W
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
91 ",T.(B" ",TV(B" ",T.(B" ",Tc(B" ",TZ(B" ",T2(B" ",TX(B" "-" ; X .. _
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
92 ",T#(B" ",Ti(B" ",TT(B" ",TE(B" ",T'(B" ",TB(B" ",T!(B" ",TQ(B" ; ` .. g
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
93 ",TU(B" ",TA(B" ",TR(B" ",T9(B" ",T`(B" ",TJ(B" ",T$(B" ",TG(B" ; h .. o
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
94 ",Ta(B" ",Tg(B" ",TM(B" ",T7(B" ",TC(B" ",T4(B" ",TK(B" ",T5(B" ; p .. w
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
95 ",T;(B" ",Th(B" ",T:(B" ",TO(B" ",Tm(B" ",TF(B" ",T%(B" 0 ; x .. DEL
dc1b915c5eba Don't require thai-util.
Kenichi Handa <handa@m17n.org>
parents: 88610
diff changeset
96 ])
38453
519983161a46 Some fixes to follow lisp coding conventions and typo fixes.
Pavel Janík <Pavel@Janik.cz>
parents: 31431
diff changeset
97
519983161a46 Some fixes to follow lisp coding conventions and typo fixes.
Pavel Janík <Pavel@Janik.cz>
parents: 31431
diff changeset
98 ;;; thai.el ends here