]> code.delx.au - gnu-emacs/blob - lisp/language/thai.el
*** empty log message ***
[gnu-emacs] / lisp / language / thai.el
1 ;;; thai.el --- support for Thai -*- coding: iso-2022-7bit; no-byte-compile: t -*-
2
3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
4 ;; Licensed to the Free Software Foundation.
5 ;; Copyright (C) 2002 Free Software Foundation, Inc.
6 ;; Copyright (C) 2003
7 ;; National Institute of Advanced Industrial Science and Technology (AIST)
8 ;; Registration Number H13PRO009
9
10 ;; Keywords: multilingual, Thai, i18n
11
12 ;; This file is part of GNU Emacs.
13
14 ;; GNU Emacs is free software; you can redistribute it and/or modify
15 ;; it under the terms of the GNU General Public License as published by
16 ;; the Free Software Foundation; either version 2, or (at your option)
17 ;; any later version.
18
19 ;; GNU Emacs is distributed in the hope that it will be useful,
20 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ;; GNU General Public License for more details.
23
24 ;; You should have received a copy of the GNU General Public License
25 ;; along with GNU Emacs; see the file COPYING. If not, write to the
26 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
27 ;; Boston, MA 02111-1307, USA.
28
29 ;;; Commentary:
30
31 ;; For Thai, the character set TIS620 is supported.
32
33 ;;; Code:
34
35 (define-coding-system 'thai-tis620
36 "8-bit encoding for ASCII (MSB=0) and Thai TIS620 (MSB=1)."
37 :coding-type 'charset
38 :mnemonic ?T
39 :charset-list '(tis620-2533))
40
41 (define-coding-system-alias 'th-tis620 'thai-tis620)
42 (define-coding-system-alias 'tis620 'thai-tis620)
43 (define-coding-system-alias 'tis-620 'thai-tis620)
44
45 (set-language-info-alist
46 "Thai" '((tutorial . "TUTORIAL.th")
47 (charset thai-tis620)
48 (coding-system thai-tis620 iso-8859-11 cp874)
49 (coding-priority thai-tis620)
50 (nonascii-translation . tis620-2533)
51 (input-method . "thai-kesmanee")
52 (unibyte-display . thai-tis620)
53 (features thai-util)
54 (sample-text
55 . (thai-compose-string
56 (copy-sequence "Thai (\e,T@RIRd7B\e(B) \e,TJ\e0GQ\e1J\e04U\e1$\e0CQ\e1:\e(B, \e,TJ\e0GQ\e1J\e04U\e1\e0$h\e1P\e(B")))
57 (documentation . t)))
58
59 (define-coding-system 'cp874
60 "DOS codepage 874 (Thai)"
61 :coding-type 'charset
62 :mnemonic ?D
63 :charset-list '(cp874)
64 :mime-charset 'cp874)
65 (define-coding-system-alias 'ibm874 'cp874)
66
67 (define-coding-system 'iso-8859-11
68 "ISO/IEC 8859/11 (Latin/Thai)
69 This is the same as `thai-tis620' with the addition of no-break-space."
70 :coding-type 'charset
71 :mnemonic ?*
72 :mime-charset 'iso-8859-11 ; not actually registered as of 2002-05-24
73 :charset-list '(iso-8859-11))
74
75 ;; For automatic composition.
76 (let ((chars "\e,TQTUVWXYZghijklmn\e(B"))
77 (dotimes (i (length chars))
78 (aset composition-function-table (aref chars i)
79 'thai-composition-function)))
80
81 (provide 'thai)
82
83 ;;; thai.el ends here