Add 2011 to FSF/AIST copyright years.
[bpt/emacs.git] / leim / quail / thai.el
CommitLineData
047eced5 1;;; thai.el --- Quail package for inputting Thai characters -*-coding: iso-2022-7bit;-*-
24b31c88 2
7976eda0 3;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
5df4f04c 4;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
1ab06fdf
KH
5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
24b31c88
KH
7
8;; Keywords: multilingual, input method, Thai
9
10;; This file is part of GNU Emacs.
11
3d544458 12;; GNU Emacs is free software: you can redistribute it and/or modify
24b31c88 13;; it under the terms of the GNU General Public License as published by
3d544458
GM
14;; the Free Software Foundation, either version 3 of the License, or
15;; (at your option) any later version.
24b31c88
KH
16
17;; GNU Emacs is distributed in the hope that it will be useful,
18;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20;; GNU General Public License for more details.
21
22;; You should have received a copy of the GNU General Public License
3d544458 23;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
24b31c88 24
be567141
PJ
25;;; Commentary:
26
24b31c88
KH
27;;; Code:
28
29(require 'quail)
55519505 30
55519505
KH
31(defmacro thai-generate-quail-map (translation-table)
32 (let (map)
33 (dotimes (i (length translation-table))
34 (let ((trans (aref translation-table i)))
35 (when (not (eq trans 0))
36 (if (> (length trans) 1)
37 (setq trans (vector trans))
38 (setq trans (aref trans 0)))
39 (setq map (cons (list (char-to-string i) trans) map)))))
40 `(quail-define-rules ,@map)))
24b31c88 41
24b31c88
KH
42;; Thai Kesmanee keyboard support.
43
44(quail-define-package
45 "thai-kesmanee" "Thai" "\e,T!!\e(B>" t
46 "Thai Kesmanee input method with TIS620 keyboard layout
47
48The difference from the ordinal Thai keyboard:
49 '\e,T_\e(B' and '\e,To\e(B' are assigned to '\\' and '|' respectively,
50 '\e,T#\e(B' and '\e,T%\e(B' are assigned to '`' and '~' respectively,
51 Don't know where to assign characters '\e,Tz\e(B' and '\e,T{\e(B'."
55519505
KH
52 nil t t t t nil nil nil nil nil t)
53
54(thai-generate-quail-map
55 [
56 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; control codes
57 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; control codes
ca9d3585 58;; This data is quite old.
1bac4db5
MB
59;; 0 "#" "." "\e,Tr\e(B" "\e,Ts\e(B" "\e,Tt\e(B" "\e,TQi\e(B" "\e,T'\e(B" ; SPC .. '
60;; "\e,Tv\e(B" "\e,Tw\e(B" "\e,Tu\e(B" "\e,Ty\e(B" "\e,TA\e(B" "\e,T"\e(B" "\e,Tc\e(B" "\e,T=\e(B" ; ( .. /
61;; "\e,T(\e(B" "\e,TE\e(B" "/" "_" "\e,T@\e(B" "\e,T6\e(B" "\e,TX\e(B" "\e,TV\e(B" ; 0 .. 7
62;; "\e,T$\e(B" "\e,T5\e(B" "\e,T+\e(B" "\e,TG\e(B" "\e,T2\e(B" "\e,T*\e(B" "\e,TL\e(B" "\e,TF\e(B" ; 8 .. ?
63;; "\e,Tq\e(B" "\e,TD\e(B" "\e,TZ\e(B" "\e,T)\e(B" "\e,T/\e(B" "\e,T.\e(B" "\e,Tb\e(B" "\e,T,\e(B" ; @ .. G
64;; "\e,Tg\e(B" "\e,T3\e(B" "\e,Tk\e(B" "\e,TI\e(B" "\e,TH\e(B" "\e,Tn\e(B" "\e,Tl\e(B" "\e,TO\e(B" ; H .. O
65;; "\e,T-\e(B" "\e,Tp\e(B" "\e,T1\e(B" "\e,T&\e(B" "\e,T8\e(B" "\e,Tj\e(B" "\e,TN\e(B" "\"" ; P .. W
66;; ")" "\e,Tm\e(B" "(" "\e,T:\e(B" "\e,T_\e(B" "\e,TE\e(B" "\e,TY\e(B" "\e,Tx\e(B" ; X .. _
67;; "\e,T#\e(B" "\e,T?\e(B" "\e,TT\e(B" "\e,Ta\e(B" "\e,T!\e(B" "\e,TS\e(B" "\e,T4\e(B" "\e,T`\e(B" ; ` .. g
68;; "\e,Ti\e(B" "\e,TC\e(B" "\e,Th\e(B" "\e,TR\e(B" "\e,TJ\e(B" "\e,T7\e(B" "\e,TW\e(B" "\e,T9\e(B" ; h .. o
69;; "\e,TB\e(B" "\e,Tf\e(B" "\e,T>\e(B" "\e,TK\e(B" "\e,TP\e(B" "\e,TU\e(B" "\e,TM\e(B" "\e,Td\e(B" ; p .. w
70;; "\e,T;\e(B" "\e,TQ\e(B" "\e,T<\e(B" "\e,T0\e(B" "\e,To\e(B" "," "\e,T%\e(B" 0 ; x .. DEL
ca9d3585 71;; This is the correct data nowadays.
1bac4db5 72 0 "+" "." "\e,Tr\e(B" "\e,Ts\e(B" "\e,Tt\e(B" "\e,T_\e(B" "\e,T'\e(B" ; SPC .. '
55519505 73 "\e,Tv\e(B" "\e,Tw\e(B" "\e,Tu\e(B" "\e,Ty\e(B" "\e,TA\e(B" "\e,T"\e(B" "\e,Tc\e(B" "\e,T=\e(B" ; ( .. /
1bac4db5 74 "\e,T(\e(B" "\e,Te\e(B" "/" "-" "\e,T@\e(B" "\e,T6\e(B" "\e,TX\e(B" "\e,TV\e(B" ; 0 .. 7
55519505
KH
75 "\e,T$\e(B" "\e,T5\e(B" "\e,T+\e(B" "\e,TG\e(B" "\e,T2\e(B" "\e,T*\e(B" "\e,TL\e(B" "\e,TF\e(B" ; 8 .. ?
76 "\e,Tq\e(B" "\e,TD\e(B" "\e,TZ\e(B" "\e,T)\e(B" "\e,T/\e(B" "\e,T.\e(B" "\e,Tb\e(B" "\e,T,\e(B" ; @ .. G
1bac4db5 77 "\e,Tg\e(B" "\e,T3\e(B" "\e,Tk\e(B" "\e,TI\e(B" "\e,TH\e(B" "?" "\e,Tl\e(B" "\e,TO\e(B" ; H .. O
55519505 78 "\e,T-\e(B" "\e,Tp\e(B" "\e,T1\e(B" "\e,T&\e(B" "\e,T8\e(B" "\e,Tj\e(B" "\e,TN\e(B" "\"" ; P .. W
1bac4db5
MB
79 "\)" "\e,Tm\e(B" "\(" "\e,T:\e(B" "\e,T#\e(B" "\e,TE\e(B" "\e,TY\e(B" "\e,Tx\e(B" ; X .. _
80 "_" "\e,T?\e(B" "\e,TT\e(B" "\e,Ta\e(B" "\e,T!\e(B" "\e,TS\e(B" "\e,T4\e(B" "\e,T`\e(B" ; ` .. g
55519505
KH
81 "\e,Ti\e(B" "\e,TC\e(B" "\e,Th\e(B" "\e,TR\e(B" "\e,TJ\e(B" "\e,T7\e(B" "\e,TW\e(B" "\e,T9\e(B" ; h .. o
82 "\e,TB\e(B" "\e,Tf\e(B" "\e,T>\e(B" "\e,TK\e(B" "\e,TP\e(B" "\e,TU\e(B" "\e,TM\e(B" "\e,Td\e(B" ; p .. w
1bac4db5 83 "\e,T;\e(B" "\e,TQ\e(B" "\e,T<\e(B" "\e,T0\e(B" "\e,T%\e(B" "," "%" 0 ; x .. DEL
55519505 84 ])
24b31c88 85
1bac4db5 86
24b31c88
KH
87;; Thai Pattachote keyboard support.
88
89(quail-define-package
90 "thai-pattachote" "Thai" "\e,T!;\e(B>" t
91 "Thai Pattachote input method with TIS620 keyboard layout"
55519505
KH
92 nil t t t t nil nil nil nil nil t)
93
94(thai-generate-quail-map
95 [
96 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; control codes
97 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ; control codes
8f924df7 98 0 "+" "\e,T1\e(B" "/" "," "?" "_" "\e,T"\e(B" ; SPC .. '
55519505
KH
99 "(" ")" "." "%" "\e,TP\e(B" "\e,Tq\e(B" "\e,T(\e(B" "\e,T>\e(B" ; ( .. /
100 "\e,Tp\e(B" "=" "\e,Tr\e(B" "\e,Ts\e(B" "\e,Tt\e(B" "\e,Tu\e(B" "\e,TY\e(B" "\e,Tw\e(B" ; 0 .. 7
101 "\e,Tx\e(B" "\e,Ty\e(B" "\e,T&\e(B" "\e,Td\e(B" "\e,T?\e(B" "\e,Tv\e(B" "\e,T2\e(B" "\e,TL\e(B" ; 8 .. ?
102 "\"" "\e,Tk\e(B" "\e,TQ\e(B" "\e,T0\e(B" "\e,TS\e(B" "\e,Tf\e(B" "\e,T3\e(B" "\e,Tl\e(B" ; @ .. G
103 "\e,TW\e(B" "\e,T+\e(B" "\e,T<\e(B" "\e,T*\e(B" "\e,Tb\e(B" "\e,TN\e(B" "\e,TH\e(B" "\e,T6\e(B" ; H .. O
104 "\e,T2\e(B" "\e,Tj\e(B" "\e,T-\e(B" "\e,T8\e(B" "\e,TI\e(B" "\e,T=\e(B" "\e,T@\e(B" "\e,TD\e(B" ; P .. W
105 "\e,T.\e(B" "\e,TV\e(B" "\e,T.\e(B" "\e,Tc\e(B" "\e,TZ\e(B" "\e,T2\e(B" "\e,TX\e(B" "-" ; X .. _
106 "\e,T#\e(B" "\e,Ti\e(B" "\e,TT\e(B" "\e,TE\e(B" "\e,T'\e(B" "\e,TB\e(B" "\e,T!\e(B" "\e,TQ\e(B" ; ` .. g
107 "\e,TU\e(B" "\e,TA\e(B" "\e,TR\e(B" "\e,T9\e(B" "\e,T`\e(B" "\e,TJ\e(B" "\e,T$\e(B" "\e,TG\e(B" ; h .. o
108 "\e,Ta\e(B" "\e,Tg\e(B" "\e,TM\e(B" "\e,T7\e(B" "\e,TC\e(B" "\e,T4\e(B" "\e,TK\e(B" "\e,T5\e(B" ; p .. w
109 "\e,T;\e(B" "\e,Th\e(B" "\e,T:\e(B" "\e,TO\e(B" "\e,Tm\e(B" "\e,TF\e(B" "\e,T%\e(B" 0 ; x .. DEL
110 ])
be567141 111
3d544458 112;; arch-tag: fed6c468-0616-44b0-88bf-47347bf64825
be567141 113;;; thai.el ends here