1 |
;;; lao-util.el --- utilities for Lao -*- coding: iso-2022-7bit; -*- |
;;; lao-util.el --- utilities for Lao -*- coding: iso-2022-7bit; -*- |
2 |
|
|
3 |
;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN. |
;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN. |
4 |
;; Licensed to the Free Software Foundation. |
;; Licensed to the Free Software Foundation. |
5 |
;; Copyright (C) 2001 Free Software Foundation, Inc. |
;; Copyright (C) 2001 Free Software Foundation, Inc. |
6 |
|
;; Copyright (C) 2003 |
7 |
|
;; National Institute of Advanced Industrial Science and Technology (AIST) |
8 |
|
;; Registration Number H13PRO009 |
9 |
|
|
10 |
;; Keywords: multilingual, Lao |
;; Keywords: multilingual, Lao, i18n |
11 |
|
|
12 |
;; This file is part of GNU Emacs. |
;; This file is part of GNU Emacs. |
13 |
|
|
131 |
(?(1{(B invalid nil) |
(?(1{(B invalid nil) |
132 |
(?(1|(B consonant "LETTER NHOR NHUU" "MOUSE") |
(?(1|(B consonant "LETTER NHOR NHUU" "MOUSE") |
133 |
(?(1}(B consonant "LETTER MHOR MHAR" "DOG") |
(?(1}(B consonant "LETTER MHOR MHAR" "DOG") |
134 |
(?(1~(B invalid nil) |
(?(1~(B invalid nil))) |
|
;; Unicode equivalents |
|
|
(?$,1D!(B consonant "LETTER KOR KAI'" "CHICKEN") |
|
|
(?$,1D"(B consonant "LETTER KHOR KHAI'" "EGG") |
|
|
(?$,1D$(B consonant "LETTER QHOR QHWARGN" "BUFFALO") |
|
|
(?$,1D'(B consonant "LETTER NGOR NGUU" "SNAKE") |
|
|
(?$,1D((B consonant "LETTER JOR JUA" "BUDDHIST NOVICE") |
|
|
(?$,1D*(B consonant "LETTER XOR X\"ARNG" "ELEPHANT") |
|
|
(?$,1D-(B consonant "LETTER YOR YUNG" "MOSQUITO") |
|
|
(?$,1D4(B consonant "LETTER DOR DANG" "NOSE") |
|
|
(?$,1D5(B consonant "LETTER TOR TAR" "EYE") |
|
|
(?$,1D6(B consonant "LETTER THOR THUNG" "TO ASK,QUESTION") |
|
|
(?$,1D7(B consonant "LETTER DHOR DHARM" "FLAG") |
|
|
(?$,1D9(B consonant "LETTER NOR NOK" "BIRD") |
|
|
(?$,1D:(B consonant "LETTER BOR BED" "FISHHOOK") |
|
|
(?$,1D;(B consonant "LETTER POR PAR" "FISH") |
|
|
(?$,1D<(B consonant "LETTER HPOR HPER\"" "BEE") |
|
|
(?$,1D=(B consonant "LETTER FHOR FHAR" "WALL") |
|
|
(?$,1D>(B consonant "LETTER PHOR PHUU" "MOUNTAIN") |
|
|
(?$,1D?(B consonant "LETTER FOR FAI" "FIRE") |
|
|
(?$,1DA(B consonant "LETTER MOR MAR\"" "HORSE") |
|
|
(?$,1DB(B consonant "LETTER GNOR GNAR" "MEDICINE") |
|
|
(?$,1DC(B consonant "LETTER ROR ROD" "CAR") |
|
|
(?$,1DE(B consonant "LETTER LOR LIING" "MONKEY") |
|
|
(?$,1DG(B consonant "LETTER WOR WII" "HAND FAN") |
|
|
(?$,1DJ(B consonant "LETTER SOR SEA" "TIGER") |
|
|
(?$,1DK(B consonant "LETTER HHOR HHAI" "JAR") |
|
|
(?$,1DM(B consonant "LETTER OR OOW" "TAKE") |
|
|
(?$,1DN(B consonant "LETTER HOR HEA" "BOAT") |
|
|
(?$,1DO(B special "ELLIPSIS") |
|
|
(?$,1DP(B vowel-base "VOWEL SIGN SARA A") |
|
|
(?$,1DQ(B vowel-upper "VOWEL SIGN MAI KAN") |
|
|
(?$,1DR(B vowel-base "VOWEL SIGN SARA AR") |
|
|
(?$,1DS(B vowel-base "VOWEL SIGN SARA AM") |
|
|
(?$,1DT(B vowel-upper "VOWEL SIGN SARA I") |
|
|
(?$,1DU(B vowel-upper "VOWEL SIGN SARA II") |
|
|
(?$,1DV(B vowel-upper "VOWEL SIGN SARA EU") |
|
|
(?$,1DW(B vowel-upper "VOWEL SIGN SARA UR") |
|
|
(?$,1DX(B vowel-lower "VOWEL SIGN SARA U") |
|
|
(?$,1DY(B vowel-lower "VOWEL SIGN SARA UU") |
|
|
(?$,1D[(B vowel-upper "VOWEL SIGN MAI KONG") |
|
|
(?$,1D\(B semivowel-lower "SEMIVOWEL SIGN LO") |
|
|
(?$,1D](B vowel-base "SEMIVOWEL SIGN SARA IA") |
|
|
(?$,1D`(B vowel-base "VOWEL SIGN SARA EE") |
|
|
(?$,1Da(B vowel-base "VOWEL SIGN SARA AA") |
|
|
(?$,1Db(B vowel-base "VOWEL SIGN SARA OO") |
|
|
(?$,1Dc(B vowel-base "VOWEL SIGN SARA EI MAI MUAN\"") |
|
|
(?$,1Dd(B vowel-base "VOWEL SIGN SARA AI MAI MAY") |
|
|
(?$,1Df(B special "KO LA (REPETITION)") |
|
|
(?$,1Dh(B tone "TONE MAI EK") |
|
|
(?$,1Di(B tone "TONE MAI THO") |
|
|
(?$,1Dj(B tone "TONE MAI TI") |
|
|
(?$,1Dk(B tone "TONE MAI JADTAWAR") |
|
|
(?$,1Dl(B tone "CANCELLATION MARK") |
|
|
(?$,1Dm(B vowel-upper "VOWEL SIGN SARA OR") |
|
|
(?$,1Dp(B special "DIGIT ZERO") |
|
|
(?$,1Dq(B special "DIGIT ONE") |
|
|
(?$,1Dr(B special "DIGIT TWO") |
|
|
(?$,1Ds(B special "DIGIT THREE") |
|
|
(?$,1Dt(B special "DIGIT FOUR") |
|
|
(?$,1Du(B special "DIGIT FIVE") |
|
|
(?$,1Dv(B special "DIGIT SIX") |
|
|
(?$,1Dw(B special "DIGIT SEVEN") |
|
|
(?$,1Dx(B special "DIGIT EIGHT") |
|
|
(?$,1Dy(B special "DIGIT NINE") |
|
|
(?$,1D|(B consonant "LETTER NHOR NHUU" "MOUSE") |
|
|
(?$,1D}(B consonant "LETTER MHOR MHAR" "DOG"))) |
|
135 |
elm) |
elm) |
136 |
(while l |
(while l |
137 |
(setq elm (car l) l (cdr l)) |
(setq elm (car l) l (cdr l)) |
156 |
;; CV -> C, CT -> C, CVT -> C, Cv -> C, CvT -> C |
;; CV -> C, CT -> C, CVT -> C, Cv -> C, CvT -> C |
157 |
;; v v |
;; v v |
158 |
;; T |
;; T |
159 |
;; V T V T |
;; V T V T |
160 |
;; CsV -> C, CsT -> C, CsVT -> C, Csv -> C, CvT -> C |
;; CsV -> C, CsT -> C, CsVT -> C, Csv -> C, CsvT -> C |
161 |
;; s s s s s |
;; s s s s s |
162 |
;; v v |
;; v v |
163 |
|
|
164 |
|
|
165 |
;; where C: consonant, V: vowel upper, v: vowel lower, |
;; where C: consonant, V: vowel upper, v: vowel lower, |
359 |
("(1d(B" (?(1d(B 0)) |
("(1d(B" (?(1d(B 0)) |
360 |
("(1c(B" (?(1c(B 0)) |
("(1c(B" (?(1c(B 0)) |
361 |
("(1`[R(B" (?(1`(B 0 ?(1[(B ?(1R(B)) |
("(1`[R(B" (?(1`(B 0 ?(1[(B ?(1R(B)) |
362 |
("(1S(B" (0 ?(1S(B)) |
("(1S(B" (0 ?(1S(B))) |
|
|
|
|
;; Unicode equivalents |
|
|
("$,1DP(B" (0 ?$,1DP(B) (0 ?$,1DQ(B)) |
|
|
("$,1DR(B" (0 ?$,1DR(B)) |
|
|
("$,1DT(B" (0 ?$,1DU(B)) |
|
|
("$,1DU(B" (0 ?$,1DU(B)) |
|
|
("$,1DV(B" (0 ?$,1DV(B)) |
|
|
("$,1DW(B" (0 ?$,1DW(B)) |
|
|
("$,1DX(B" (0 ?$,1DX(B)) |
|
|
("$,1DY(B" (0 ?$,1DY(B)) |
|
|
("$,1D`DP(B" (?$,1D`(B 0 ?$,1DP(B) (?$,1D`(B 0 ?$,1DQ(B)) |
|
|
("$,1D`(B" (?$,1D`(B 0)) |
|
|
("$,1DaDP(B" (?$,1Da(B 0 ?$,1DP(B) (?$,1Da(B 0 ?$,1DQ(B)) |
|
|
("$,1Da(B" (?$,1Da(B 0)) |
|
|
("$,1DbDP(B" (?$,1Db(B 0 ?$,1DP(B) (0 ?$,1D[(B) (?$,1D-(B ?$,1Db(B 0 ?$,1DQ(B) (?$,1DG(B ?$,1Db(B 0 ?$,1DQ(B)) |
|
|
("$,1Db(B" (?$,1Db(B 0)) |
|
|
("$,1D`DRDP(B" (?$,1D`(B 0 ?$,1DR(B ?$,1DP(B) (0 ?$,1DQ(B ?$,1DM(B)) |
|
|
("$,1Dm(B" (0 ?$,1Dm(B) (0 ?$,1DM(B)) |
|
|
("$,1D`DT(B" (?$,1D`(B 0 ?$,1DT(B)) |
|
|
("$,1D`DU(B" (?$,1D`(B 0 ?$,1DU(B)) |
|
|
("$,1D[DGDP(B" (0 ?$,1D[(B ?$,1DG(B ?$,1DP(B) (0 ?$,1DQ(B ?$,1DG(B)) |
|
|
("$,1D[DG(B" (0 ?$,1D[(B ?$,1DG(B) (0 ?$,1DG(B)) |
|
|
("$,1D`DQD]DP(B" (?$,1D`(B 0 ?$,1DQ(B ?$,1D](B ?$,1DP(B) (0 ?$,1DQ(B ?$,1D](B)) |
|
|
("$,1D`DQD](B" (?$,1D`(B 0 ?$,1DQ(B ?$,1D](B) (0 ?$,1D](B)) |
|
|
("$,1D`DVDM(B" (?$,1D`(B 0 ?$,1DV(B ?$,1DM(B)) |
|
|
("$,1D`DWDM(B" (?$,1D`(B 0 ?$,1DW(B ?$,1DM(B)) |
|
|
("$,1Dd(B" (?$,1Dd(B 0)) |
|
|
("$,1Dc(B" (?$,1Dc(B 0)) |
|
|
("$,1D`D[DR(B" (?$,1D`(B 0 ?$,1D[(B ?$,1DR(B)) |
|
|
("$,1DS(B" (0 ?$,1DS(B))) |
|
363 |
"Alist of Lao vowel string vs the corresponding re-ordering rule. |
"Alist of Lao vowel string vs the corresponding re-ordering rule. |
364 |
Each element has this form: |
Each element has this form: |
365 |
(VOWEL NO-MAA-SAKOD-RULE WITH-MAA-SAKOD-RULE (MAA-SAKOD-0 RULE-0) ...) |
(VOWEL NO-MAA-SAKOD-RULE WITH-MAA-SAKOD-RULE (MAA-SAKOD-0 RULE-0) ...) |
490 |
lao-str))) |
lao-str))) |
491 |
|
|
492 |
;;;###autoload |
;;;###autoload |
493 |
(defun lao-post-read-conversion (len) |
(defun lao-composition-function (pos &optional string) |
494 |
(lao-compose-region (point) (+ (point) len)) |
(setq pos (1- pos)) |
495 |
len) |
(with-category-table lao-category-table |
496 |
|
(if string |
497 |
;;;###autoload |
(if (and (>= pos 0) |
498 |
(defun lao-composition-function (from to pattern &optional string) |
(eq (string-match lao-composition-pattern string pos) pos)) |
499 |
"Compose Lao text in the region FROM and TO. |
(prog1 (match-end 0) |
500 |
The text matches the regular expression PATTERN. |
(compose-string string pos (match-end 0)))) |
501 |
Optional 4th argument STRING, if non-nil, is a string containing text |
(if (>= pos (point-min)) |
502 |
to compose. |
(save-excursion |
503 |
|
(goto-char pos) |
504 |
The return value is number of composed characters." |
(if (looking-at lao-composition-pattern) |
505 |
(if (< (1+ from) to) |
(prog1 (match-end 0) |
506 |
(progn |
(compose-region pos (match-end 0))))))))) |
|
(if string |
|
|
(compose-string string from to) |
|
|
(compose-region from to)) |
|
|
(- to from)))) |
|
507 |
|
|
508 |
;;;###autoload |
;;;###autoload |
509 |
(defun lao-compose-region (from to) |
(defun lao-compose-region (from to) |