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,
5 ;; National Institute of Advanced Industrial Science and Technology (AIST)
6 ;; Registration Number H14PRO021
7 ;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005,
8 ;; 2006, 2007 Free Software Foundation, Inc.
10 ;; Keywords: multilingual, Thai
12 ;; This file is part of GNU Emacs.
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 3, or (at your option)
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.
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., 51 Franklin Street, Fifth Floor,
27 ;; Boston, MA 02110-1301, USA.
31 ;; For Thai, the character set TIS620 is supported.
37 "8-bit encoding for ASCII (MSB=0) and Thai TIS620 (MSB=1)."
38 '(ascii thai-tis620 nil nil
39 nil nil nil nil nil nil nil nil nil nil nil t
)
40 '((safe-charsets ascii thai-tis620
)
41 (mime-charset . tis-620
)
42 (post-read-conversion . thai-post-read-conversion
)))
44 (define-coding-system-alias 'th-tis620
'thai-tis620
)
45 (define-coding-system-alias 'tis620
'thai-tis620
)
46 (define-coding-system-alias 'tis-620
'thai-tis620
)
48 (set-language-info-alist
49 "Thai" '((tutorial .
"TUTORIAL.th")
51 (coding-system thai-tis620
)
52 (coding-priority thai-tis620
)
53 (nonascii-translation . thai-tis620
)
54 (input-method .
"thai-kesmanee")
55 (unibyte-display . thai-tis620
)
57 (setup-function . setup-thai-language-environment-internal
)
58 (exit-function . exit-thai-language-environment-internal
)
60 .
(thai-compose-string
61 (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")))
65 ;; Register a function to compose Thai characters.
66 (let ((patterns '(("\\c0?\\(\\c2\\|\\c3\\|\\c4\\)+"
67 . thai-composition-function
))))
68 (aset composition-function-table
(make-char 'thai-tis620
) patterns
)
69 (dotimes (i (1+ (- #xe7f
#xe00
)))
70 (aset composition-function-table
(decode-char 'ucs
(+ i
#xe00
)) patterns
)))
74 ;;; arch-tag: c7eb0e91-4db0-4619-81f8-8762e7d51e15