annotate lisp/mule/thai.el @ 147:e186c2b7192d xemacs-20-2

Added tag r20-2p1 for changeset 2af401a6ecca
author cvs
date Mon, 13 Aug 2007 09:34:48 +0200
parents 131b0175ea99
children 3bb7ccffb0c0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1 ;; Thai language specific setup for Mule
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
2 ;; Copyright (C) 1992 Free Software Foundation, Inc.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
3
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
4 ;; This file is part of XEmacs.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
5 ;; This file contains European characters
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
6
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
7 ;; XEmacs is free software; you can redistribute it and/or modify it
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
8 ;; under the terms of the GNU General Public License as published by
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
9 ;; the Free Software Foundation; either version 2, or (at your option)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
10 ;; any later version.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
11
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
12 ;; XEmacs is distributed in the hope that it will be useful, but
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
13 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
15 ;; General Public License for more details.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
16
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
17 ;; You should have received a copy of the GNU General Public License
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
18 ;; along with XEmacs; see the file COPYING. If not, write to the
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
19 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
20 ;; Boston, MA 02111-1307, USA.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
21
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
22 ;;; 93.1.21 created for Mule Ver.0.9.7.1 by K.Handa <handa@etl.go.jp>
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
23
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
24 (defconst thai-character-alist
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
25 '((?,T!(B . consonant) ; 0xA1: LETTER KO KAI
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
26 (?,T"(B . consonant) ; 0xA2: LETTER KHO KHAI
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
27 (?,T#(B . consonant) ; 0xA3: LETTER KHO KHUAT (obsolete)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
28 (?,T$(B . consonant) ; 0xA4: LETTER KHO KHWAI
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
29 (?,T%(B . consonant) ; 0xA5: LETTER KHO KHON (obsolete)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
30 (?,T&(B . consonant) ; 0xA6: LETTER KHO RAKHANG
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
31 (?,T'(B . consonant) ; 0xA7: LETTER NGO NGU
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
32 (?,T((B . consonant) ; 0xA8: LETTER CHO CHAN
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
33 (?,T)(B . consonant) ; 0xA9: LETTER CHO CHING
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
34 (?,T*(B . consonant) ; 0xAA: LETTER CHO CHANG
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
35 (?,T+(B . consonant) ; 0xAB: LETTER SO SO
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
36 (?,T,(B . consonant) ; 0xAC: LETTER CHO CHOE
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
37 (?,T-(B . consonant) ; 0xAD: LETTER YO YING
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
38 (?,T.(B . consonant) ; 0xAE: LETTER DO CHADA
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
39 (?,T/(B . consonant) ; 0xAF: LETTER TO PATAK
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
40 (?,T0(B . consonant) ; 0xB0: LETTER THO THAN
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
41 (?,T1(B . consonant) ; 0xB1: LETTER THO NANGMONTHO
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
42 (?,T2(B . consonant) ; 0xB2: LETTER THO PHUTHAO
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
43 (?,T3(B . consonant) ; 0xB3: LETTER NO NEN
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
44 (?,T4(B . consonant) ; 0xB4: LETTER DO DEK
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
45 (?,T5(B . consonant) ; 0xB5: LETTER TO TAO
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
46 (?,T6(B . consonant) ; 0xB6: LETTER THO THUNG
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
47 (?,T7(B . consonant) ; 0xB7: LETTER THO THAHAN
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
48 (?,T8(B . consonant) ; 0xB8: LETTER THO THONG
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
49 (?,T9(B . consonant) ; 0xB9: LETTER NO NU
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
50 (?,T:(B . consonant) ; 0xBA: LETTER BO BAIMAI
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
51 (?,T;(B . consonant) ; 0xBB: LETTER PO PLA
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
52 (?,T<(B . consonant) ; 0xBC: LETTER PHO PHUNG
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
53 (?,T=(B . consonant) ; 0xBD: LETTER FO FA
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
54 (?,T>(B . consonant) ; 0xBE: LETTER PHO PHAN
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
55 (?,T?(B . consonant) ; 0xBF: LETTER FO FAN
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
56 (?,T@(B . consonant) ; 0xC0: LETTER PHO SAMPHAO
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
57 (?,TA(B . consonant) ; 0xC1: LETTER MO MA
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
58 (?,TB(B . consonant) ; 0xC2: LETTER YO YAK
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
59 (?,TC(B . consonant) ; 0xC3: LETTER RO RUA
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
60 (?,TD(B . vowel-base) ; 0xC4: LETTER RU (vowel letter used to write Pali)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
61 (?,TE(B . consonant) ; 0xC5: LETTER LO LING
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
62 (?,TF(B . vowel-base) ; 0xC6: LETTER LU (vowel letter used to write Pali)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
63 (?,TG(B . consonant) ; 0xC7: LETTER WO WAEN
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
64 (?,TH(B . consonant) ; 0xC8: LETTER SO SALA
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
65 (?,TI(B . consonant) ; 0xC9: LETTER SO RUSI
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
66 (?,TJ(B . consonant) ; 0xCA: LETTER SO SUA
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
67 (?,TK(B . consonant) ; 0xCB: LETTER HO HIP
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
68 (?,TL(B . consonant) ; 0xCC: LETTER LO CHULA
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
69 (?,TM(B . consonant) ; 0xCD: LETTER O ANG
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
70 (?,TN(B . consonant) ; 0xCE: LETTER HO NOK HUK
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
71 (?,TO(B . special) ; 0xCF: PAI YAN NOI (abbreviation)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
72 (?,TP(B . vowel-base) ; 0xD0: VOWEL SIGN SARA A
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
73 (?,TQ(B . vowel-upper) ; 0xD1: VOWEL SIGN MAI HAN-AKAT N/S-T
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
74 (?,TR(B . vowel-base) ; 0xD2: VOWEL SIGN SARA AA
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
75 (?,TS(B . vowel-base) ; 0xD3: VOWEL SIGN SARA AM
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
76 (?,TT(B . vowel-upper) ; 0xD4: VOWEL SIGN SARA I N/S-T
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
77 (?,TU(B . vowel-upper) ; 0xD5: VOWEL SIGN SARA II N/S-T
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
78 (?,TV(B . vowel-upper) ; 0xD6: VOWEL SIGN SARA UE N/S-T
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
79 (?,TW(B . vowel-upper) ; 0xD7: VOWEL SIGN SARA UEE N/S-T
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
80 (?,TX(B . vowel-lower) ; 0xD8: VOWEL SIGN SARA U N/S-B
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
81 (?,TY(B . vowel-lower) ; 0xD9: VOWEL SIGN SARA UU N/S-B
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
82 (?,TZ(B . vowel-lower) ; 0xDA: VOWEL SIGN PHINTHU N/S-B (Pali virama)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
83 (?,T[(B . not-used) ; 0xDA:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
84 (?,T\(B . not-used) ; 0xDC:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
85 (?,T](B . not-used) ; 0xDC:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
86 (?,T^(B . not-used) ; 0xDC:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
87 (?,T_(B . special) ; 0xDF: BAHT SIGN (currency symbol)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
88 (?,T`(B . vowel-base) ; 0xE0: VOWEL SIGN SARA E
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
89 (?,Ta(B . vowel-base) ; 0xE1: VOWEL SIGN SARA AE
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
90 (?,Tb(B . vowel-base) ; 0xE2: VOWEL SIGN SARA O
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
91 (?,Tc(B . vowel-base) ; 0xE3: VOWEL SIGN SARA MAI MUAN
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
92 (?,Td(B . vowel-base) ; 0xE4: VOWEL SIGN SARA MAI MALAI
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
93 (?,Te(B . vowel-base) ; 0xE5: LAK KHANG YAO
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
94 (?,Tf(B . special) ; 0xE6: MAI YAMOK (repetion)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
95 (?,Tg(B . vowel-upper) ; 0xE7: VOWEL SIGN MAI TAI KHU N/S-T
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
96 (?,Th(B . tone) ; 0xE8: TONE MAI EK N/S-T
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
97 (?,Ti(B . tone) ; 0xE9: TONE MAI THO N/S-T
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
98 (?,Tj(B . tone) ; 0xEA: TONE MAI TRI N/S-T
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
99 (?,Tk(B . tone) ; 0xEB: TONE MAI CHATTAWA N/S-T
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
100 (?,Tl(B . tone) ; 0xEC: THANTHAKHAT N/S-T (cancellation mark)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
101 (?,Tm(B . tone) ; 0xED: NIKKHAHIT N/S-T (final nasal)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
102 (?,Tn(B . vowel-upper) ; 0xEE: YAMAKKAN N/S-T
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
103 (?,To(B . special) ; 0xEF: FONRMAN
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
104 (?,Tp(B . special) ; 0xF0: DIGIT ZERO
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
105 (?,Tq(B . special) ; 0xF1: DIGIT ONE
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
106 (?,Tr(B . special) ; 0xF2: DIGIT TWO
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
107 (?,Ts(B . special) ; 0xF3: DIGIT THREE
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
108 (?,Tt(B . special) ; 0xF4: DIGIT FOUR
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
109 (?,Tu(B . special) ; 0xF5: DIGIT FIVE
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
110 (?,Tv(B . special) ; 0xF6: DIGIT SIX
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
111 (?,Tw(B . special) ; 0xF7: DIGIT SEVEN
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
112 (?,Tx(B . special) ; 0xF8: DIGIT EIGHT
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
113 (?,Ty(B . special) ; 0xF9: DIGIT NINE
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
114 (?,Tz(B . special) ; 0xFA: ANGKHANKHU (ellipsis)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
115 (?,T{(B . special) ; 0xFB: KHOMUT (beginning of religious texts)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
116 (?,T|(B . not-used) ; 0xFC:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
117 (?,T}(B . not-used) ; 0xFD:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
118 (?,T~(B . not-used) ; 0xFE:
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
119 )
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
120 "Association list of thai-character and property.")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
121 (setq thai-character-alist
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
122 (cons (cons (string-to-char "0,TQi1(B") 'vowel-upper-tone) thai-character-alist))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
123
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
124 (defconst thai-category-table
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
125 (copy-category-table (standard-category-table))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
126 "Category table for Thai.")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
127 (define-category-mnemonic ?0 "Thai consonants"
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
128 thai-category-table)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
129 (define-category-mnemonic ?1 "Thai upper/lower vowel or tone mark."
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
130 thai-category-table)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
131 (define-category-mnemonic ?2 "Thai base vowel or special characters."
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
132 thai-category-table)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
133
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
134 (let ((chars thai-character-alist)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
135 ch prop)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
136 (while chars
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
137 (setq ch (car (car chars))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
138 prop (cdr (car chars)))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
139 (cond ((eq prop 'consonant)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
140 (modify-category-entry ch ?0 thai-category-table))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
141 ((or (eq prop 'vowel-upper)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
142 (eq prop 'vowel-lower)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
143 (eq prop 'tone))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
144 (modify-category-entry ch ?1 thai-category-table))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
145 ((null (eq prop 'vowel-upper-tone))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
146 (modify-category-entry ch ?2 thai-category-table)))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
147 (setq chars (cdr chars))))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
148
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
149 ;;;###autoload
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
150 (defun thai-compose-buffer ()
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
151 "Compose Thai characters in the current buffer."
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
152 (interactive)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
153 (thai-compose-region (point-min) (point-max)))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
154
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
155 ;;;###autoload
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
156 (defun thai-compose-region (beg end)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
157 "Compose Thai characters in the region."
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
158 (interactive "r")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
159 (save-restriction
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
160 (narrow-to-region beg end)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
161 (decompose-region (point-min) (point-max))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
162 (goto-char (point-min))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
163 (let ((ctbl (category-table))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
164 str)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
165 (unwind-protect
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
166 (progn
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
167 (set-category-table thai-category-table)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
168 (while (re-search-forward "\\c0\\c1+" nil t)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
169 (compose-region (match-beginning 0) (match-end 0))))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
170 (set-category-table ctbl)))))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
171
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
172 ;;;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
173 (provide 'thai)