Fix GTK font name parsing to allow numbers in names (Bug#7853).
[emacs.git] / lisp / language / thai.el
blobb4f3177a2332b313ee6ffacaa35756554ffb5435
1 ;;; thai.el --- support for Thai -*- coding: iso-2022-7bit; no-byte-compile: t -*-
3 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 ;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
5 ;; National Institute of Advanced Industrial Science and Technology (AIST)
6 ;; Registration Number H13PRO009
7 ;; Copyright (C) 2005
8 ;; National Institute of Advanced Industrial Science and Technology (AIST)
9 ;; Registration Number H14PRO021
10 ;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005,
11 ;; 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
13 ;; Keywords: multilingual, Thai, i18n
15 ;; This file is part of GNU Emacs.
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
19 ;; the Free Software Foundation, either version 3 of the License, or
20 ;; (at your option) any later version.
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.
27 ;; You should have received a copy of the GNU General Public License
28 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
30 ;;; Commentary:
32 ;; For Thai, the character set TIS620 is supported.
34 ;;; Code:
36 (define-coding-system 'thai-tis620
37 "8-bit encoding for ASCII (MSB=0) and Thai TIS620 (MSB=1)."
38 :coding-type 'charset
39 :mnemonic ?T
40 :charset-list '(tis620-2533))
42 (define-coding-system-alias 'th-tis620 'thai-tis620)
43 (define-coding-system-alias 'tis620 'thai-tis620)
44 (define-coding-system-alias 'tis-620 'thai-tis620)
46 (set-language-info-alist
47 "Thai" '((tutorial . "TUTORIAL.th")
48 (charset thai-tis620)
49 (coding-system thai-tis620 iso-8859-11 cp874)
50 (coding-priority thai-tis620)
51 (nonascii-translation . tis620-2533)
52 (input-method . "thai-kesmanee")
53 (unibyte-display . thai-tis620)
54 (features thai-util)
55 (setup-function . setup-thai-language-environment-internal)
56 (exit-function . exit-thai-language-environment-internal)
57 (sample-text
58 . (thai-compose-string
59 (copy-sequence "Thai (\e,T@RIRd7B\e(B) \e,TJGQJ4U$CQ:\e(B, \e,TJGQJ4U$hP\e(B")))
60 (documentation . t)))
62 (define-coding-system 'cp874
63 "DOS codepage 874 (Thai)"
64 :coding-type 'charset
65 :mnemonic ?D
66 :charset-list '(cp874)
67 :mime-charset 'cp874)
68 (define-coding-system-alias 'ibm874 'cp874)
70 (define-coding-system 'iso-8859-11
71 "ISO/IEC 8859/11 (Latin/Thai)
72 This is the same as `thai-tis620' with the addition of no-break-space."
73 :coding-type 'charset
74 :mnemonic ?*
75 :mime-charset 'iso-8859-11 ; not actually registered as of 2002-05-24
76 :charset-list '(iso-8859-11))
78 ;; For automatic composition.
79 (let ((chars "\e,TQTUVWXYZghijklmn\e(B")
80 (elt '(["[\e,T!\e(B-\e,TO\e(B].[\e,Thijkl\e(B]?\e,TS\e(B?" 1 thai-composition-function]
81 [nil 0 thai-composition-function])))
82 (dotimes (i (length chars))
83 (aset composition-function-table (aref chars i) elt)))
84 (aset composition-function-table ?\e,TS\e(B '(["[\e,T!\e(B-\e,TO\e(B]." 1 thai-composition-function]))
86 (provide 'thai)
88 ;; arch-tag: c7eb0e91-4db0-4619-81f8-8762e7d51e15
89 ;;; thai.el ends here