/[emacs]/emacs/lisp/language/thai-util.el
ViewVC logotype

Diff of /emacs/lisp/language/thai-util.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.26 by lektu, Tue Feb 4 13:11:50 2003 UTC revision 1.26.6.1 by handa, Mon Sep 8 12:53:41 2003 UTC
# Line 1  Line 1 
1  ;;; thai-util.el --- utilities for Thai -*- coding: iso-2022-7bit; -*-  ;;; thai-util.el --- utilities for Thai -*- coding: iso-2022-7bit; -*-
2    
3  ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.  ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
4  ;; Licensed to the Free Software Foundation.  ;;   Licensed to the Free Software Foundation.
5    ;; Copyright (C) 2003
6    ;;   National Institute of Advanced Industrial Science and Technology (AIST)
7    ;;   Registration Number H13PRO009
8    
9  ;; Keywords: mule, multilingual, thai  ;; Keywords: mule, multilingual, Thai, i18n
10    
11  ;; This file is part of GNU Emacs.  ;; This file is part of GNU Emacs.
12    
# Line 139  Line 142 
142             (?,T|(B invalid nil)                                               ; 0xFC             (?,T|(B invalid nil)                                               ; 0xFC
143             (?,T}(B invalid nil)                                               ; 0xFD             (?,T}(B invalid nil)                                               ; 0xFD
144             (?,T~(B invalid nil)                                               ; 0xFE             (?,T~(B invalid nil)                                               ; 0xFE
   
            ;; Unicode equivalents  
            (?$,1Ba(B consonant "LETTER KO KAI")  
            (?$,1Bb(B consonant "LETTER KHO KHAI")  
            (?$,1Bc(B consonant "LETTER KHO KHUAT")  
            (?$,1Bd(B consonant "LETTER KHO KHWAI")  
            (?$,1Be(B consonant "LETTER KHO KHON")  
            (?$,1Bf(B consonant "LETTER KHO RAKHANG")  
            (?$,1Bg(B consonant "LETTER NGO NGU")  
            (?$,1Bh(B consonant "LETTER CHO CHAN")  
            (?$,1Bi(B consonant "LETTER CHO CHING")  
            (?$,1Bj(B consonant "LETTER CHO CHANG")  
            (?$,1Bk(B consonant "LETTER SO SO")  
            (?$,1Bl(B consonant "LETTER CHO CHOE")  
            (?$,1Bm(B consonant "LETTER YO YING")  
            (?$,1Bn(B consonant "LETTER DO CHADA")  
            (?$,1Bo(B consonant "LETTER TO PATAK")  
            (?$,1Bp(B consonant "LETTER THO THAN")  
            (?$,1Bq(B consonant "LETTER THO NANGMONTHO")  
            (?$,1Br(B consonant "LETTER THO PHUTHAO")  
            (?$,1Bs(B consonant "LETTER NO NEN")  
            (?$,1Bt(B consonant "LETTER DO DEK")  
            (?$,1Bu(B consonant "LETTER TO TAO")  
            (?$,1Bv(B consonant "LETTER THO THUNG")  
            (?$,1Bw(B consonant "LETTER THO THAHAN")  
            (?$,1Bx(B consonant "LETTER THO THONG")  
            (?$,1By(B consonant "LETTER NO NU")  
            (?$,1Bz(B consonant "LETTER BO BAIMAI")  
            (?$,1B{(B consonant "LETTER PO PLA")  
            (?$,1B|(B consonant "LETTER PHO PHUNG")  
            (?$,1B}(B consonant "LETTER FO FA")  
            (?$,1B~(B consonant "LETTER PHO PHAN")  
            (?$,1B(B consonant "LETTER FO FAN")  
            (?$,1C (B consonant "LETTER PHO SAMPHAO")  
            (?$,1C!(B consonant "LETTER MO MA")  
            (?$,1C"(B consonant "LETTER YO YAK")  
            (?$,1C#(B consonant "LETTER RO RUA")  
            (?$,1C$(B vowel-base "LETTER RU (Pali vowel letter)")  
            (?$,1C%(B consonant "LETTER LO LING")  
            (?$,1C&(B vowel-base "LETTER LU (Pali vowel letter)")  
            (?$,1C'(B consonant "LETTER WO WAEN")  
            (?$,1C((B consonant "LETTER SO SALA")  
            (?$,1C)(B consonant "LETTER SO RUSI")  
            (?$,1C*(B consonant "LETTER SO SUA")  
            (?$,1C+(B consonant "LETTER HO HIP")  
            (?$,1C,(B consonant "LETTER LO CHULA")  
            (?$,1C-(B consonant "LETTER O ANG")  
            (?$,1C.(B consonant "LETTER HO NOK HUK")  
            (?$,1C/(B special "PAI YAN NOI (abbreviation)")  
            (?$,1C0(B vowel-base "VOWEL SIGN SARA A")  
            (?$,1C1(B vowel-upper "VOWEL SIGN MAI HAN-AKAT N/S-T")  
            (?$,1C2(B vowel-base "VOWEL SIGN SARA AA")  
            (?$,1C3(B vowel-base "VOWEL SIGN SARA AM")  
            (?$,1C4(B vowel-upper "VOWEL SIGN SARA I N/S-T")  
            (?$,1C5(B vowel-upper "VOWEL SIGN SARA II N/S-T")  
            (?$,1C6(B vowel-upper "VOWEL SIGN SARA UE N/S-T")  
            (?$,1C7(B vowel-upper "VOWEL SIGN SARA UEE N/S-T")  
            (?$,1C8(B vowel-lower "VOWEL SIGN SARA U N/S-B")  
            (?$,1C9(B vowel-lower "VOWEL SIGN SARA UU N/S-B")  
            (?$,1C:(B vowel-lower "VOWEL SIGN PHINTHU N/S-B (Pali virama)")  
            (?$,1C?(B special "BAHT SIGN (currency symbol)")  
            (?$,1C@(B vowel-base "VOWEL SIGN SARA E")  
            (?$,1CA(B vowel-base "VOWEL SIGN SARA AE")  
            (?$,1CB(B vowel-base "VOWEL SIGN SARA O")  
            (?$,1CC(B vowel-base "VOWEL SIGN SARA MAI MUAN")  
            (?$,1CD(B vowel-base "VOWEL SIGN SARA MAI MALAI")  
            (?$,1CE(B vowel-base "LAK KHANG YAO")  
            (?$,1CF(B special "MAI YAMOK (repetion)")  
            (?$,1CG(B vowel-upper "VOWEL SIGN MAI TAI KHU N/S-T")  
            (?$,1CH(B tone "TONE MAI EK N/S-T")  
            (?$,1CI(B tone "TONE MAI THO N/S-T")  
            (?$,1CJ(B tone "TONE MAI TRI N/S-T")  
            (?$,1CK(B tone "TONE MAI CHATTAWA N/S-T")  
            (?$,1CL(B tone "THANTHAKHAT N/S-T (cancellation mark)")  
            (?$,1CM(B tone "NIKKHAHIT N/S-T (final nasal)")  
            (?$,1CN(B vowel-upper "YAMAKKAN N/S-T")  
            (?$,1CO(B special "FONRMAN")  
            (?$,1CP(B special "DIGIT ZERO")  
            (?$,1CQ(B special "DIGIT ONE")  
            (?$,1CR(B special "DIGIT TWO")  
            (?$,1CS(B special "DIGIT THREE")  
            (?$,1CT(B special "DIGIT FOUR")  
            (?$,1CU(B special "DIGIT FIVE")  
            (?$,1CV(B special "DIGIT SIX")  
            (?$,1CW(B special "DIGIT SEVEN")  
            (?$,1CX(B special "DIGIT EIGHT")  
            (?$,1CY(B special "DIGIT NINE")  
            (?$,1CZ(B special "ANGKHANKHU (ellipsis)")  
            (?$,1C[(B special "KHOMUT (beginning of religious texts)")  
145             ))             ))
146        elm)        elm)
147    (while l    (while l
# Line 273  positions (integers or markers) specifyi Line 187  positions (integers or markers) specifyi
187    (thai-compose-region (point-min) (point-max)))    (thai-compose-region (point-min) (point-max)))
188    
189  ;;;###autoload  ;;;###autoload
190  (defun thai-post-read-conversion (len)  (defun thai-composition-function (pos &optional string)
191    (thai-compose-region (point) (+ (point) len))    (setq pos (1- pos))
192    len)    (let ((pattern "[,T!(B-,TCEG(B-,TN!(B-,TCEG(B-,TN(B][,TQT(B-,TWgnX(B-,TZQT(B-,TWgnX(B-,TZ(B]?[,Th(B-,Tmh(B-,Tm(B]?"))
193        (if string
194  ;;;###autoload          (if (and (>= pos 0)
195  (defun thai-composition-function (from to pattern &optional string)                   (eq (string-match pattern string pos) pos))
196    "Compose Thai text in the region FROM and TO.              (prog1 (match-end 0)
197  The text matches the regular expression PATTERN.                (compose-string string pos (match-end 0))))
198  Optional 4th argument STRING, if non-nil, is a string containing text        (if (>= pos (point-min))
199  to compose.            (progn
200                (goto-char pos)
201  The return value is number of composed characters."              (if (looking-at pattern)
202    (if (< (1+ from) to)                  (prog1 (match-end 0)
203        (progn                    (compose-region pos (match-end 0)))))))))
         (if string  
             (compose-string string from to)  
           (compose-region from to))  
         (- to from))))  
204    
205  ;;  ;;
206  (provide 'thai-util)  (provide 'thai-util)

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.26.6.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26