1 ;;; thai.el --- support for Thai -*- coding: iso-2022-7bit; no-byte-compile: t -*-
3 ;; Copyright (C) 1995, 1997, 1998, 1999, 2000, 2002, 2005
4 ;; National Institute of Advanced Industrial Science and Technology (AIST)
5 ;; Registration Number H14PRO021
6 ;; Copyright (C) 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
8 ;; Keywords: multilingual, Thai
10 ;; This file is part of GNU Emacs.
12 ;; GNU Emacs is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 2, or (at your option)
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
24 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
25 ;; Boston, MA 02110-1301, USA.
29 ;; For Thai, the character set TIS620 is supported.
35 "8-bit encoding for ASCII (MSB=0) and Thai TIS620 (MSB=1)."
36 '(ascii thai-tis620 nil nil
37 nil nil nil nil nil nil nil nil nil nil nil t
)
38 '((safe-charsets ascii thai-tis620
)
39 (mime-charset . tis-620
)
40 (post-read-conversion . thai-post-read-conversion
)))
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")
49 (coding-system thai-tis620
)
50 (coding-priority thai-tis620
)
51 (nonascii-translation . thai-tis620
)
52 (input-method .
"thai-kesmanee")
53 (unibyte-display . thai-tis620
)
55 (setup-function . setup-thai-language-environment-internal
)
56 (exit-function . exit-thai-language-environment-internal
)
58 .
(thai-compose-string
59 (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")))
63 ;; Register a function to compose Thai characters.
64 (let ((patterns '(("\\c0?\\(\\c2\\|\\c3\\|\\c4\\)+"
65 . thai-composition-function
))))
66 (aset composition-function-table
(make-char 'thai-tis620
) patterns
)
67 (dotimes (i (1+ (- #xe7f
#xe00
)))
68 (aset composition-function-table
(decode-char 'ucs
(+ i
#xe00
)) patterns
)))
72 ;;; arch-tag: c7eb0e91-4db0-4619-81f8-8762e7d51e15