Commit | Line | Data |
---|---|---|
0a10297a | 1 | ;;; thai.el --- support for Thai -*- coding: iso-2022-7bit; no-byte-compile: t -*- |
4ed46869 | 2 | |
7976eda0 | 3 | ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
38141d20 | 4 | ;; 2005, 2006, 2007, 2008 |
8f924df7 KH |
5 | ;; National Institute of Advanced Industrial Science and Technology (AIST) |
6 | ;; Registration Number H13PRO009 | |
db328182 KH |
7 | ;; Copyright (C) 2005 |
8 | ;; National Institute of Advanced Industrial Science and Technology (AIST) | |
9 | ;; Registration Number H14PRO021 | |
d4877ac1 | 10 | ;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, |
38141d20 | 11 | ;; 2006, 2007, 2008 Free Software Foundation, Inc. |
4ed46869 | 12 | |
2d244aeb | 13 | ;; Keywords: multilingual, Thai, i18n |
4ed46869 KH |
14 | |
15 | ;; This file is part of GNU Emacs. | |
16 | ||
17 | ;; GNU Emacs is free software; you can redistribute it and/or modify | |
18 | ;; it under the terms of the GNU General Public License as published by | |
d7142f3e | 19 | ;; the Free Software Foundation; either version 3, or (at your option) |
4ed46869 KH |
20 | ;; any later version. |
21 | ||
22 | ;; GNU Emacs is distributed in the hope that it will be useful, | |
23 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
24 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
25 | ;; GNU General Public License for more details. | |
26 | ||
27 | ;; You should have received a copy of the GNU General Public License | |
369314dc | 28 | ;; along with GNU Emacs; see the file COPYING. If not, write to the |
3a35cf56 LK |
29 | ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
30 | ;; Boston, MA 02110-1301, USA. | |
4ed46869 KH |
31 | |
32 | ;;; Commentary: | |
33 | ||
34 | ;; For Thai, the character set TIS620 is supported. | |
35 | ||
36 | ;;; Code: | |
37 | ||
e1915ab3 KH |
38 | (define-coding-system 'thai-tis620 |
39 | "8-bit encoding for ASCII (MSB=0) and Thai TIS620 (MSB=1)." | |
40 | :coding-type 'charset | |
41 | :mnemonic ?T | |
42 | :charset-list '(tis620-2533)) | |
a7f2c216 | 43 | |
2e21aa27 RS |
44 | (define-coding-system-alias 'th-tis620 'thai-tis620) |
45 | (define-coding-system-alias 'tis620 'thai-tis620) | |
5d22a4c9 | 46 | (define-coding-system-alias 'tis-620 'thai-tis620) |
4ed46869 | 47 | |
4ed46869 KH |
48 | (set-language-info-alist |
49 | "Thai" '((tutorial . "TUTORIAL.th") | |
a79a3c79 | 50 | (charset thai-tis620) |
2d13c267 | 51 | (coding-system thai-tis620 iso-8859-11 cp874) |
a79a3c79 | 52 | (coding-priority thai-tis620) |
e1915ab3 | 53 | (nonascii-translation . tis620-2533) |
a564ccf9 KH |
54 | (input-method . "thai-kesmanee") |
55 | (unibyte-display . thai-tis620) | |
56 | (features thai-util) | |
44053845 KH |
57 | (setup-function . setup-thai-language-environment-internal) |
58 | (exit-function . exit-thai-language-environment-internal) | |
a1506d29 | 59 | (sample-text |
e2a20aa7 | 60 | . (thai-compose-string |
1bac4db5 | 61 | (copy-sequence "Thai (\e,T@RIRd7B\e(B) \e,TJGQJ4U$CQ:\e(B, \e,TJGQJ4U$hP\e(B"))) |
78eee0ed | 62 | (documentation . t))) |
4ed46869 | 63 | |
10c7550e DL |
64 | (define-coding-system 'cp874 |
65 | "DOS codepage 874 (Thai)" | |
66 | :coding-type 'charset | |
67 | :mnemonic ?D | |
68 | :charset-list '(cp874) | |
69 | :mime-charset 'cp874) | |
70 | (define-coding-system-alias 'ibm874 'cp874) | |
71 | ||
2d244aeb DL |
72 | (define-coding-system 'iso-8859-11 |
73 | "ISO/IEC 8859/11 (Latin/Thai) | |
74 | This is the same as `thai-tis620' with the addition of no-break-space." | |
75 | :coding-type 'charset | |
76 | :mnemonic ?* | |
77 | :mime-charset 'iso-8859-11 ; not actually registered as of 2002-05-24 | |
78 | :charset-list '(iso-8859-11)) | |
79 | ||
1662e139 KH |
80 | ;; For automatic composition. |
81 | (let ((chars "\e,TQTUVWXYZghijklmn\e(B")) | |
82 | (dotimes (i (length chars)) | |
83 | (aset composition-function-table (aref chars i) | |
84 | 'thai-composition-function))) | |
c27737aa | 85 | |
41da80b1 DL |
86 | (provide 'thai) |
87 | ||
cbee283d | 88 | ;; arch-tag: c7eb0e91-4db0-4619-81f8-8762e7d51e15 |
4ed46869 | 89 | ;;; thai.el ends here |