]> 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; -*-
2
3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
4 ;; Licensed to the Free Software Foundation.
5 ;; Copyright (C) 2002 Free Software Foundation, Inc.
6
7 ;; Keywords: multilingual, Thai, i18n
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
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA.
25
26 ;;; Commentary:
27
28 ;; For Thai, the character set TIS620 is supported.
29
30 ;;; Code:
31
32 (define-coding-system 'thai-tis620
33 "8-bit encoding for ASCII (MSB=0) and Thai TIS620 (MSB=1)."
34 :coding-type 'charset
35 :mnemonic ?T
36 :charset-list '(tis620-2533))
37
38 (define-coding-system-alias 'th-tis620 'thai-tis620)
39 (define-coding-system-alias 'tis620 'thai-tis620)
40 (define-coding-system-alias 'tis-620 'thai-tis620)
41
42 (set-language-info-alist
43 "Thai" '((tutorial . "TUTORIAL.th")
44 (charset thai-tis620)
45 (coding-system thai-tis620 iso-8859-11 cp874)
46 (coding-priority thai-tis620)
47 (nonascii-translation . tis620-2533)
48 (input-method . "thai-kesmanee")
49 (unibyte-display . thai-tis620)
50 (features thai-util)
51 (sample-text
52 . (thai-compose-string
53 (copy-sequence "Thai (\e,T@RIRd7B\e(B) \e,TJGQJ4U$CQ:\e(B, \e,TJGQJ4U$hP\e(B")))
54 (documentation . t)))
55
56
57 (define-coding-system 'cp874
58 "DOS codepage 874 (Thai)"
59 :coding-type 'charset
60 :mnemonic ?D
61 :charset-list '(cp874)
62 :mime-charset 'cp874)
63 (define-coding-system-alias 'ibm874 'cp874)
64
65 (define-coding-system 'iso-8859-11
66 "ISO/IEC 8859/11 (Latin/Thai)
67 This is the same as `thai-tis620' with the addition of no-break-space."
68 :coding-type 'charset
69 :mnemonic ?*
70 :mime-charset 'iso-8859-11 ; not actually registered as of 2002-05-24
71 :charset-list '(iso-8859-11))
72
73 ;; For automatic composition.
74 (let ((chars "\e,TQTUVWXYZghijklmn\e(B"))
75 (dotimes (i (length chars))
76 (aset composition-function-table (aref chars i)
77 'thai-composition-function)))
78
79 (provide 'thai)
80
81 ;;; thai.el ends here