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

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

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

revision 1.5 by pj, Mon Dec 17 20:56:03 2001 UTC revision 1.5.4.1 by miles, Fri Apr 4 06:20:26 2003 UTC
# Line 2  Line 2 
2    
3  ;; Copyright (C) 2001 Free Software Foundation, Inc.  ;; Copyright (C) 2001 Free Software Foundation, Inc.
4    
5  ;; Maintainer:  KAWABATA, Taichi <batta@beige.ocn.ne.jp>  ;; Maintainer:  KAWABATA, Taichi <kawabata@m17n.org>
6  ;; Keywords: multilingual, Indian, Devanagari  ;; Keywords: multilingual, Indian, Devanagari
7    
8  ;; This file is part of GNU Emacs.  ;; This file is part of GNU Emacs.
# Line 44  Line 44 
44    "Returns the regular expression of hashtable keys."    "Returns the regular expression of hashtable keys."
45    (let ((max-specpdl-size 1000))    (let ((max-specpdl-size 1000))
46      (regexp-opt      (regexp-opt
47       (sort       (sort
48        (let (dummy)        (let (dummy)
49          (maphash (function (lambda (key val) (setq dummy (cons key dummy))))          (maphash (function (lambda (key val) (setq dummy (cons key dummy))))
50                   hashtbl)                   hashtbl)
# Line 55  Line 55 
55    '(    '(
56      (;; VOWELS  (18)      (;; VOWELS  (18)
57       (?$,15E(B nil) (?$,15F(B ?$,15~(B) (?$,15G(B ?$,15(B) (?$,15H(B ?$,16 (B) (?$,15I(B ?$,16!(B) (?$,15J(B ?$,16"(B)       (?$,15E(B nil) (?$,15F(B ?$,15~(B) (?$,15G(B ?$,15(B) (?$,15H(B ?$,16 (B) (?$,15I(B ?$,16!(B) (?$,15J(B ?$,16"(B)
58       (?$,15K(B ?$,16#(B) (?$,15L(B ?$,16$(B) (?$,15M(B ?$,16%(B) (?$,15N(B ?$,16&(B) (?$,15O(B ?$,16'(B) (?$,15P(B ?$,16((B)       (?$,15K(B ?$,16#(B) (?$,15L(B ?$,16B(B) (?$,15M(B ?$,16%(B) (?$,15N(B ?$,16&(B) (?$,15O(B ?$,16'(B) (?$,15P(B ?$,16((B)
59       (?$,15Q(B ?$,16)(B) (?$,15R(B ?$,16*(B) (?$,15S(B ?$,16+(B) (?$,15T(B ?$,16,(B) (?$,16@(B ?$,16B(B) (?$,16A(B ?$,16C(B))       (?$,15Q(B ?$,16)(B) (?$,15R(B ?$,16*(B) (?$,15S(B ?$,16+(B) (?$,15T(B ?$,16,(B) (?$,16@(B ?$,16$(B) (?$,16A(B ?$,16C(B))
60      (;; CONSONANTS (currently 42, including special cases)      (;; CONSONANTS (currently 42, including special cases)
61       ?$,15U(B ?$,15V(B ?$,15W(B ?$,15X(B ?$,15Y(B                  ;; GUTTRULS       ?$,15U(B ?$,15V(B ?$,15W(B ?$,15X(B ?$,15Y(B                  ;; GUTTRULS
62       ?$,15Z(B ?$,15[(B ?$,15\(B ?$,15](B ?$,15^(B                  ;; PALATALS         ?$,15Z(B ?$,15[(B ?$,15\(B ?$,15](B ?$,15^(B                  ;; PALATALS
63       ?$,15_(B ?$,15`(B ?$,15a(B ?$,15b(B ?$,15c(B                  ;; CEREBRALS       ?$,15_(B ?$,15`(B ?$,15a(B ?$,15b(B ?$,15c(B                  ;; CEREBRALS
64       ?$,15d(B ?$,15e(B ?$,15f(B ?$,15g(B ?$,15h(B ?$,15i(B              ;; DENTALS         ?$,15d(B ?$,15e(B ?$,15f(B ?$,15g(B ?$,15h(B ?$,15i(B              ;; DENTALS
65       ?$,15j(B ?$,15k(B ?$,15l(B ?$,15m(B ?$,15n(B                  ;; LABIALS         ?$,15j(B ?$,15k(B ?$,15l(B ?$,15m(B ?$,15n(B                  ;; LABIALS
66       ?$,15o(B ?$,15p(B ?$,15q(B ?$,15r(B ?$,15s(B ?$,15t(B ?$,15u(B          ;; SEMIVOWELS       ?$,15o(B ?$,15p(B ?$,15q(B ?$,15r(B ?$,15s(B ?$,15t(B ?$,15u(B          ;; SEMIVOWELS
67       ?$,15v(B ?$,15w(B ?$,15x(B ?$,15y(B                    ;; SIBILANTS       ?$,15v(B ?$,15w(B ?$,15x(B ?$,15y(B                    ;; SIBILANTS
68       ?$,168(B ?$,169(B ?$,16:(B ?$,16;(B ?$,16<(B ?$,16=(B ?$,16>(B ?$,16?(B      ;; NUKTAS           ?$,168(B ?$,169(B ?$,16:(B ?$,16;(B ?$,16<(B ?$,16=(B ?$,16>(B ?$,16?(B      ;; NUKTAS
69       "$,15\6-5^(B" "$,15U6-5w(B")       "$,15\6-5^(B" "$,15U6-5w(B")
70      (;; Misc Symbols (7)        (;; Misc Symbols (7)
71       ?$,15A(B ?$,15B(B ?$,15C(B ?$,15}(B ?$,16-(B ?$,160(B ?$,16D(B)       ?$,15A(B ?$,15B(B ?$,15C(B ?$,15}(B ?$,16-(B ?$,160(B ?$,16D(B)
72      (;; Digits (10)      (;; Digits (10)
73       ?$,16F(B ?$,16G(B ?$,16H(B ?$,16I(B ?$,16J(B ?$,16K(B ?$,16L(B ?$,16M(B ?$,16N(B ?$,16O(B)       ?$,16F(B ?$,16G(B ?$,16H(B ?$,16I(B ?$,16J(B ?$,16K(B ?$,16L(B ?$,16M(B ?$,16N(B ?$,16O(B)
74      (;; Inscript-extra (4)  (#, $, ^, *, ])      (;; Inscript-extra (4)  (#, $, ^, *, ])
75       "$,16-5p(B" "$,15p6-(B" "$,15d6-5p(B" "$,15v6-5p(B" "$,15|(B")))       "$,16-5p(B" "$,15p6-(B" "$,15d6-5p(B" "$,15v6-5p(B" "$,15|(B")))
76    
77  (defvar indian-pnj-base-table nil)  ;; Punjabi is also known as Gurmukhi.
78  (defvar indian-ori-base-table nil)  (defvar indian-pnj-base-table
79  (defvar indian-bng-base-table nil)    '(
80  (defvar indian-asm-base-table nil)      (;; VOWELS
81  (defvar indian-tlg-base-table nil)       (?$,18%(B nil) (?$,18&(B ?$,18^(B) (?$,18'(B ?$,18_(B) (?$,18((B ?$,18`(B) (?$,18)(B ?$,18a(B) (?$,18*(B ?$,18b(B)
82  (defvar indian-knd-base-table nil)       nil nil nil nil (?$,18/(B ?$,18g(B) (?$,180(B ?$,18h(B)
83  (defvar indian-mlm-base-table nil)       nil nil (?$,183(B ?$,18k(B) (?$,184(B ?$,18l(B) nil nil)
84  (defvar indian-tml-base-table nil)      (;; CONSONANTS
85         ?$,185(B ?$,186(B ?$,187(B ?$,188(B ?$,189(B                  ;; GUTTRULS
86         ?$,18:(B ?$,18;(B ?$,18<(B ?$,18=(B ?$,18>(B                  ;; PALATALS
87         ?$,18?(B ?$,18@(B ?$,18A(B ?$,18B(B ?$,18C(B                  ;; CEREBRALS
88         ?$,18D(B ?$,18E(B ?$,18F(B ?$,18G(B ?$,18H(B nil              ;; DENTALS
89         ?$,18J(B ?$,18K(B ?$,18L(B ?$,18M(B ?$,18N(B                  ;; LABIALS
90         ?$,18O(B ?$,18P(B nil ?$,18R(B ?$,18S(B nil ?$,18U(B          ;; SEMIVOWELS
91         ?$,18V(B nil ?$,18X(B ?$,18Y(B                    ;; SIBILANTS
92         nil ?$,18y(B ?$,18z(B ?$,18{(B ?$,18|(B nil ?$,18~(B nil      ;; NUKTAS
93         "$,18<8m8>(B" nil)
94        (;; Misc Symbols (7)
95         nil ?$,18"(B nil nil ?$,18m(B nil nil) ;; ek onkar, etc.
96        (;; Digits
97         ?$,19&(B ?$,19'(B ?$,19((B ?$,19)(B ?$,19*(B ?$,19+(B ?$,19,(B ?$,19-(B ?$,19.(B ?$,19/(B)
98        (;; Inscript-extra (4)  (#, $, ^, *, ])
99         "$,18m8P(B" "$,18P8m(B" "$,18D8m8P(B" "$,18V8m8P(B" "$,18\(B")))
100    
101    (defvar indian-gjr-base-table
102      '(
103        (;; VOWELS
104         (?$,19E(B nil) (?$,19F(B ?$,19~(B) (?$,19G(B ?$,19(B) (?$,19H(B ?$,1: (B) (?$,19I(B ?$,1:!(B) (?$,19J(B ?$,1:"(B)
105         (?$,19K(B ?$,1:#(B) nil (?$,19M(B ?$,1:%(B) nil (?$,19O(B ?$,1:'(B) (?$,19P(B ?$,1:((B)
106         (?$,19Q(B ?$,1:)(B) nil (?$,19S(B ?$,1:+(B) (?$,19T(B ?$,1:,(B) (?$,1:@(B ?$,1:$(B) nil)
107        (;; CONSONANTS
108         ?$,19U(B ?$,19V(B ?$,19W(B ?$,19X(B ?$,19Y(B                  ;; GUTTRULS
109         ?$,19Z(B ?$,19[(B ?$,19\(B ?$,19](B ?$,19^(B                  ;; PALATALS
110         ?$,19_(B ?$,19`(B ?$,19a(B ?$,19b(B ?$,19c(B                  ;; CEREBRALS
111         ?$,19d(B ?$,19e(B ?$,19f(B ?$,19g(B ?$,19h(B nil              ;; DENTALS
112         ?$,19j(B ?$,19k(B ?$,19l(B ?$,19m(B ?$,19n(B                  ;; LABIALS
113         ?$,19o(B ?$,19p(B nil ?$,19r(B ?$,19s(B nil ?$,19u(B          ;; SEMIVOWELS
114         ?$,19v(B ?$,19w(B ?$,19x(B ?$,19y(B                    ;; SIBILANTS
115         nil nil nil nil nil nil nil nil      ;; NUKTAS
116         "$,19\:-9^(B" "$,19U:-9w(B")
117        (;; Misc Symbols (7)
118         ?$,19A(B ?$,19B(B ?$,19C(B ?$,19}(B ?$,1:-(B ?$,1:0(B nil)
119        (;; Digits
120         ?$,1:F(B ?$,1:G(B ?$,1:H(B ?$,1:I(B ?$,1:J(B ?$,1:K(B ?$,1:L(B ?$,1:M(B ?$,1:N(B ?$,1:O(B)
121        (;; Inscript-extra (4)  (#, $, ^, *, ])
122         "$,1:-9p(B" "$,19p:-(B" "$,19d:-9p(B" "$,19v:-9p(B" "$,19|(B")))
123    
124    (defvar indian-ori-base-table
125      '(
126        (;; VOWELS
127         (?$,1:e(B nil) (?$,1:f(B ?$,1;>(B) (?$,1:g(B ?$,1;?(B) (?$,1:h(B ?$,1;@(B) (?$,1:i(B ?$,1;A(B) (?$,1:j(B ?$,1;B(B)
128         (?$,1:k(B ?$,1;C(B) (?$,1:l(B nil) nil nil (?$,1:o(B ?$,1;G(B) (?$,1:p(B ?$,1;H(B)
129         nil nil (?$,1:s(B ?$,1;K(B) (?$,1:t(B ?$,1;L(B) (?$,1;`(B nil) (?$,1;a(B nil))
130        (;; CONSONANTS
131         ?$,1:u(B ?$,1:v(B ?$,1:w(B ?$,1:x(B ?$,1:y(B                  ;; GUTTRULS
132         ?$,1:z(B ?$,1:{(B ?$,1:|(B ?$,1:}(B ?$,1:~(B                  ;; PALATALS
133         ?$,1:(B ?$,1; (B ?$,1;!(B ?$,1;"(B ?$,1;#(B                  ;; CEREBRALS
134         ?$,1;$(B ?$,1;%(B ?$,1;&(B ?$,1;'(B ?$,1;((B nil              ;; DENTALS
135         ?$,1;*(B ?$,1;+(B ?$,1;,(B ?$,1;-(B ?$,1;.(B                  ;; LABIALS
136         ?$,1;/(B ?$,1;0(B nil ?$,1;2(B ?$,1;3(B nil nil          ;; SEMIVOWELS
137         ?$,1;6(B ?$,1;7(B ?$,1;8(B ?$,1;9(B                    ;; SIBILANTS
138         nil nil nil nil ?$,1;\(B ?$,1;](B nil ?$,1;_(B      ;; NUKTAS
139         "$,1:|;M:~(B" "$,1:u;M;7(B")
140        (;; Misc Symbols
141         ?$,1:a(B ?$,1:b(B ?$,1:c(B ?$,1;=(B ?$,1;M(B nil nil)
142        (;; Digits
143         ?$,1;f(B ?$,1;g(B ?$,1;h(B ?$,1;i(B ?$,1;j(B ?$,1;k(B ?$,1;l(B ?$,1;m(B ?$,1;n(B ?$,1;o(B)
144        (;; Inscript-extra (4)  (#, $, ^, *, ])
145         "$,1;M;0(B" "$,1;0;M(B" "$,1;$;M;0(B" "$,1;6;M;0(B" "$,1;<(B")))
146    
147    (defvar indian-bng-base-table
148      '(
149        (;; VOWELS
150         (?$,16e(B nil) (?$,16f(B ?$,17>(B) (?$,16g(B ?$,17?(B) (?$,16h(B ?$,17@(B) (?$,16i(B ?$,17A(B) (?$,16j(B ?$,17B(B)
151         (?$,16k(B ?$,17C(B) (?$,16l(B ?$,17b(B) nil nil (?$,16o(B ?$,17G(B) (?$,16p(B ?$,17H(B)
152         nil nil (?$,16s(B ?$,17K(B) (?$,16t(B ?$,17L(B) (?$,17`(B ?$,17D(B) (?$,17a(B ?$,17c(B))
153        (;; CONSONANTS
154         ?$,16u(B ?$,16v(B ?$,16w(B ?$,16x(B ?$,16y(B                  ;; GUTTRULS
155         ?$,16z(B ?$,16{(B ?$,16|(B ?$,16}(B ?$,16~(B                  ;; PALATALS
156         ?$,16(B ?$,17 (B ?$,17!(B ?$,17"(B ?$,17#(B                  ;; CEREBRALS
157         ?$,17$(B ?$,17%(B ?$,17&(B ?$,17'(B ?$,17((B nil              ;; DENTALS
158         ?$,17*(B ?$,17+(B ?$,17,(B ?$,17-(B ?$,17.(B                  ;; LABIALS
159         ?$,17/(B ?$,170(B nil ?$,172(B nil nil nil          ;; SEMIVOWELS
160         ?$,176(B ?$,177(B ?$,178(B ?$,179(B                    ;; SIBILANTS
161         nil nil nil nil ?$,17\(B ?$,17](B nil ?$,17_(B      ;; NUKTAS
162         "$,16|7M6~(B" "$,16u7M77(B")
163        (;; Misc Symbols
164         ?$,16a(B ?$,16b(B ?$,16c(B nil ?$,17M(B nil nil)
165        (;; Digits
166         ?$,17f(B ?$,17g(B ?$,17h(B ?$,17i(B ?$,17j(B ?$,17k(B ?$,17l(B ?$,17m(B ?$,17n(B ?$,17o(B)
167        (;; Inscript-extra (4)  (#, $, ^, *, ])
168         "$,17M70(B" "$,1707M(B" "$,17$7M70(B" "$,1767M70(B" "$,17<(B")))
169    
170    (defvar indian-asm-base-table
171      '(
172        (;; VOWELS
173         (?$,16e(B nil) (?$,16f(B ?$,17>(B) (?$,16g(B ?$,17?(B) (?$,16h(B ?$,17@(B) (?$,16i(B ?$,17A(B) (?$,16j(B ?$,17B(B)
174         (?$,16k(B ?$,17C(B) (?$,16l(B ?$,17b(B) nil nil (?$,16o(B ?$,17G(B) (?$,16p(B ?$,17H(B)
175         nil nil (?$,16s(B ?$,17K(B) (?$,16t(B ?$,17L(B) (?$,17`(B ?$,17D(B) (?$,17a(B ?$,17c(B))
176        (;; CONSONANTS
177         ?$,16u(B ?$,16v(B ?$,16w(B ?$,16x(B ?$,16y(B                  ;; GUTTRULS
178         ?$,16z(B ?$,16{(B ?$,16|(B ?$,16}(B ?$,16~(B                  ;; PALATALS
179         ?$,16(B ?$,17 (B ?$,17!(B ?$,17"(B ?$,17#(B                  ;; CEREBRALS
180         ?$,17$(B ?$,17%(B ?$,17&(B ?$,17'(B ?$,17((B nil              ;; DENTALS
181         ?$,17*(B ?$,17+(B ?$,17,(B ?$,17-(B ?$,17.(B                  ;; LABIALS
182         ?$,17/(B ?$,17p(B nil ?$,172(B nil nil ?$,17q(B          ;; SEMIVOWELS
183         ?$,176(B ?$,177(B ?$,178(B ?$,179(B                    ;; SIBILANTS
184         nil nil nil nil ?$,17\(B ?$,17](B nil ?$,17_(B      ;; NUKTAS
185         "$,16|7M6~(B" "$,16u7M77(B")
186        (;; Misc Symbols
187         ?$,16a(B ?$,16b(B ?$,16c(B nil ?$,17M(B nil nil)
188        (;; Digits
189         ?$,17f(B ?$,17g(B ?$,17h(B ?$,17i(B ?$,17j(B ?$,17k(B ?$,17l(B ?$,17m(B ?$,17n(B ?$,17o(B)
190        (;; Inscript-extra (4)  (#, $, ^, *, ])
191         "$,17M7p(B" "$,17p7M(B" "$,17$7M7p(B" "$,1767M7p(B" "$,17<(B")))
192    
193    (defvar indian-tlg-base-table
194      '(
195        (;; VOWELS
196         (?$,1=E(B nil) (?$,1=F(B ?$,1=~(B) (?$,1=G(B ?$,1=(B) (?$,1=H(B ?$,1> (B) (?$,1=I(B ?$,1>!(B) (?$,1=J(B ?$,1>"(B)
197         (?$,1=K(B ?$,1>#(B) (?$,1=L(B nil) nil (?$,1=O(B ?$,1>'(B) (?$,1=N(B ?$,1>&(B) (?$,1=P(B ?$,1>((B)
198         nil (?$,1=S(B ?$,1>+(B) (?$,1=R(B ?$,1>*(B) (?$,1=T(B ?$,1>,(B) (?$,1>@(B ?$,1>$(B) (?$,1>A(B nil))
199        (;; CONSONANTS
200         ?$,1=U(B ?$,1=V(B ?$,1=W(B ?$,1=X(B ?$,1=Y(B                  ;; GUTTRULS
201         ?$,1=Z(B ?$,1=[(B ?$,1=\(B ?$,1=](B ?$,1=^(B                  ;; PALATALS
202         ?$,1=_(B ?$,1=`(B ?$,1=a(B ?$,1=b(B ?$,1=c(B                  ;; CEREBRALS
203         ?$,1=d(B ?$,1=e(B ?$,1=f(B ?$,1=g(B ?$,1=h(B nil              ;; DENTALS
204         ?$,1=j(B ?$,1=k(B ?$,1=l(B ?$,1=m(B ?$,1=n(B                  ;; LABIALS
205         ?$,1=o(B ?$,1=p(B ?$,1=q(B ?$,1=r(B ?$,1=s(B nil ?$,1=u(B          ;; SEMIVOWELS
206         ?$,1=v(B ?$,1=w(B ?$,1=x(B ?$,1=y(B                    ;; SIBILANTS
207         nil nil nil nil nil nil nil nil      ;; NUKTAS
208         "$,1=\>-=^(B" "$,1=U>-=w(B")
209        (;; Misc Symbols
210         ?$,1=A(B ?$,1=B(B ?$,1=C(B nil ?$,1>-(B nil nil)
211        (;; Digits
212         ?$,1>F(B ?$,1>G(B ?$,1>H(B ?$,1>I(B ?$,1>J(B ?$,1>K(B ?$,1>L(B ?$,1>M(B ?$,1>N(B ?$,1>O(B)
213        (;; Inscript-extra (4)  (#, $, ^, *, ])
214         "$,1>-=p(B" "$,1=p>-(B" "$,1=d>-=p(B" "$,1=v>-=p(B" nil)))
215    
216    (defvar indian-knd-base-table
217      '(
218        (;; VOWELS
219         (?$,1>e(B nil) (?$,1>f(B ?$,1?>(B) (?$,1>g(B ?$,1??(B) (?$,1>h(B ?$,1?@(B) (?$,1>i(B ?$,1?A(B) (?$,1>j(B ?$,1?B(B)
220         (?$,1>k(B ?$,1?C(B) (?$,1>l(B nil) nil (?$,1>o(B ?$,1?G(B) (?$,1>n(B ?$,1?F(B) (?$,1>p(B ?$,1?H(B)
221         nil (?$,1>s(B ?$,1?K(B) (?$,1>r(B ?$,1?J(B) (?$,1>t(B ?$,1?L(B) (?$,1?`(B ?$,1?D(B) (?$,1?a(B nil))
222        (;; CONSONANTS
223         ?$,1>u(B ?$,1>v(B ?$,1>w(B ?$,1>x(B ?$,1>y(B                  ;; GUTTRULS
224         ?$,1>z(B ?$,1>{(B ?$,1>|(B ?$,1>}(B ?$,1>~(B                  ;; PALATALS
225         ?$,1>(B ?$,1? (B ?$,1?!(B ?$,1?"(B ?$,1?#(B                  ;; CEREBRALS
226         ?$,1?$(B ?$,1?%(B ?$,1?&(B ?$,1?'(B ?$,1?((B nil              ;; DENTALS
227         ?$,1?*(B ?$,1?+(B ?$,1?,(B ?$,1?-(B ?$,1?.(B                  ;; LABIALS
228         ?$,1?/(B ?$,1?0(B ?$,1?1(B ?$,1?2(B ?$,1?3(B nil ?$,1?5(B          ;; SEMIVOWELS
229         ?$,1?6(B ?$,1?7(B ?$,1?8(B ?$,1?9(B                    ;; SIBILANTS
230         nil nil nil nil nil nil ?$,1?^(B nil      ;; NUKTAS
231         "$,1>|?M>~(B" "$,1>u?M?7(B")
232        (;; Misc Symbols
233         nil ?$,1>b(B ?$,1>c(B nil ?$,1?M(B nil nil)
234        (;; Digits
235         ?$,1?f(B ?$,1?g(B ?$,1?h(B ?$,1?i(B ?$,1?j(B ?$,1?k(B ?$,1?l(B ?$,1?m(B ?$,1?n(B ?$,1?o(B)
236        (;; Inscript-extra (4)  (#, $, ^, *, ])
237         "$,1?M?0(B" "$,1?0?M(B" "$,1?$?M?0(B" "$,1?6?M?0(B" nil)))
238    
239    (defvar indian-mlm-base-table
240      '(
241        (;; VOWELS
242         (?$,1@%(B nil) (?$,1@&(B ?$,1@^(B) (?$,1@'(B ?$,1@_(B) (?$,1@((B ?$,1@`(B) (?$,1@)(B ?$,1@a(B) (?$,1@*(B ?$,1@b(B)
243         (?$,1@+(B ?$,1@c(B) (?$,1@,(B nil) nil (?$,1@/(B ?$,1@g(B) (?$,1@.(B ?$,1@f(B) (?$,1@0(B ?$,1@h(B)
244         nil (?$,1@3(B ?$,1@k(B) (?$,1@2(B ?$,1@j(B) (?$,1@4(B ?$,1@l(B) nil nil)
245        (;; CONSONANTS
246         ?$,1@5(B ?$,1@6(B ?$,1@7(B ?$,1@8(B ?$,1@9(B                  ;; GUTTRULS
247         ?$,1@:(B ?$,1@;(B ?$,1@<(B ?$,1@=(B ?$,1@>(B                  ;; PALATALS
248         ?$,1@?(B ?$,1@@(B ?$,1@A(B ?$,1@B(B ?$,1@C(B                  ;; CEREBRALS
249         ?$,1@D(B ?$,1@E(B ?$,1@F(B ?$,1@G(B ?$,1@H(B nil              ;; DENTALS
250         ?$,1@J(B ?$,1@K(B ?$,1@L(B ?$,1@M(B ?$,1@N(B                  ;; LABIALS
251         ?$,1@O(B ?$,1@P(B ?$,1@Q(B ?$,1@R(B ?$,1@S(B ?$,1@T(B ?$,1@U(B          ;; SEMIVOWELS
252         ?$,1@V(B ?$,1@W(B ?$,1@X(B ?$,1@Y(B                    ;; SIBILANTS
253         nil nil nil nil nil nil nil nil      ;; NUKTAS
254         "$,1@<@m@>(B" "$,1@5@m@W(B")
255        (;; Misc Symbols
256         nil ?$,1@"(B ?$,1@#(B nil ?$,1@m(B nil nil)
257        (;; Digits
258         ?$,1A&(B ?$,1A'(B ?$,1A((B ?$,1A)(B ?$,1A*(B ?$,1A+(B ?$,1A,(B ?$,1A-(B ?$,1A.(B ?$,1A/(B)
259        (;; Inscript-extra (4)  (#, $, ^, *, ])
260         "$,1@m@P(B" "$,1@P@m(B" "$,1@D@m@P(B" "$,1@V@m@P(B" nil)))
261    
262    (defvar indian-tml-base-table
263      '(
264        (;; VOWELS
265         (?$,1<%(B nil) (?$,1<&(B ?$,1<^(B) (?$,1<'(B ?$,1<_(B) (?$,1<((B ?$,1<`(B) (?$,1<)(B ?$,1<a(B) (?$,1<*(B ?$,1<b(B)
266         nil nil nil (?$,1</(B ?$,1<g(B) (?$,1<.(B ?$,1<f(B) (?$,1<0(B ?$,1<h(B)
267         nil (?$,1<3(B ?$,1<k(B) (?$,1<2(B ?$,1<j(B) (?$,1<4(B ?$,1<l(B) nil nil)
268        (;; CONSONANTS
269         ?$,1<5(B nil nil nil ?$,1<9(B                  ;; GUTTRULS
270         ?$,1<:(B nil ?$,1<<(B nil ?$,1<>(B                  ;; PALATALS
271         ?$,1<?(B nil nil nil ?$,1<C(B                  ;; CEREBRALS
272         ?$,1<D(B nil nil nil ?$,1<H(B ?$,1<I(B              ;; DENTALS
273         ?$,1<J(B nil nil nil ?$,1<N(B                  ;; LABIALS
274         ?$,1<O(B ?$,1<P(B ?$,1<Q(B ?$,1<R(B ?$,1<S(B ?$,1<T(B ?$,1<U(B          ;; SEMIVOWELS
275         nil ?$,1<W(B ?$,1<X(B ?$,1<Y(B                    ;; SIBILANTS
276         nil nil nil nil nil nil nil nil      ;; NUKTAS
277         "$,1<<<m<>(B" "$,1<5<m<W(B")
278        (;; Misc Symbols
279         nil ?$,1<"(B ?$,1<#(B nil ?$,1<m(B nil nil)
280        (;; Digits
281         nil ?$,1='(B ?$,1=((B ?$,1=)(B ?$,1=*(B ?$,1=+(B ?$,1=,(B ?$,1=-(B ?$,1=.(B ?$,1=/(B)
282        (;; Inscript-extra (4)  (#, $, ^, *, ])
283         "$,1<m<P(B" "$,1<P<m(B" "$,1<D<m<P(B" nil nil)))
284    
285  (defvar indian-base-table-to-language-alist  (defvar indian-base-table-to-language-alist
286    '((indian-dev-base-table . "Devanagari")    '((indian-dev-base-table . "Devanagari")
287      (indian-pnj-base-table . "Punjabi")          (indian-pnj-base-table . "Punjabi")
288      (indian-ori-base-table . "Oriya")      (indian-ori-base-table . "Oriya")
289      (indian-bng-base-table . "Bengali")      (indian-bng-base-table . "Bengali")
290      (indian-asm-base-table . "Assamese")      (indian-asm-base-table . "Assamese")
# Line 98  Line 297 
297    '(;; for encode/decode    '(;; for encode/decode
298      (;; vowels -- 18      (;; vowels -- 18
299       "a" ("aa" "A") "i" ("ii" "I") "u" ("uu" "U")       "a" ("aa" "A") "i" ("ii" "I") "u" ("uu" "U")
300       ("RRi" "R^i") ("LLi" "L^i") (".c" "e.c") nil "e" "ai"       ("RRi" "R^i") ("LLi" "L^i") (".c" "e.c") "E" "e" "ai"
301       "o.c"  nil   "o"   "au"  ("RRI" "R^I") ("LLI" "L^I"))       "o.c"  "O"   "o"   "au"  ("RRI" "R^I") ("LLI" "L^I"))
302      (;; consonants -- 40      (;; consonants -- 40
303       "k"   "kh"  "g"   "gh"  ("~N" "N^")       "k"   "kh"  "g"   "gh"  ("~N" "N^")
304       "ch" ("Ch" "chh") "j" "jh" ("~n" "JN")       "ch" ("Ch" "chh") "j" "jh" ("~n" "JN")
305       "T"   "Th"  "D"   "Dh"  "N"       "T"   "Th"  "D"   "Dh"  "N"
306       "t"   "th"  "d"   "dh"  "n"   "nh"       "t"   "th"  "d"   "dh"  "n"   "nh"
307       "p"   "ph"  "b"   "bh"  "m"       "p"   "ph"  "b"   "bh"  "m"
308       "y"   "r"   "rh"  "l"   ("L" "ld") nil  ("v" "w")       "y"   "r"   "rh"  "l"   ("L" "ld") nil  ("v" "w")
309       "sh" ("Sh" "shh") "s" "h"       "sh" ("Sh" "shh") "s" "h"
# Line 196  arguments, with all possible combination Line 395  arguments, with all possible combination
395  Thus, if SEQ1 contains 3 elements and SEQ2 contains 5 elements, then  Thus, if SEQ1 contains 3 elements and SEQ2 contains 5 elements, then
396  FUNCTION will be called 15 times."  FUNCTION will be called 15 times."
397    (if seqrest    (if seqrest
398        (mapcar        (mapcar
399         (lambda (x)         (lambda (x)
400           (apply           (apply
401            'mapthread            'mapthread
402            `(lambda (&rest y) (apply ',function x y))            `(lambda (&rest y) (apply ',function x y))
403            seqrest))            seqrest))
404         seq1)         seq1)
# Line 225  FUNCTION will be called 15 times." Line 424  FUNCTION will be called 15 times."
424      (funcall f (pop l1) (pop l2))))      (funcall f (pop l1) (pop l2))))
425    
426  (defun indian--puthash-v (v trans-v hashtbls)  (defun indian--puthash-v (v trans-v hashtbls)
427    (indian--map    (indian--map
428     (lambda (v trans-v)     (lambda (v trans-v)
429       (indian--puthash-char (car v) trans-v hashtbls))       (indian--puthash-char (car v) trans-v hashtbls))
430     v trans-v))     v trans-v))
# Line 253  FUNCTION will be called 15 times." Line 452  FUNCTION will be called 15 times."
452            (setq v (if (char-valid-p (cadr v)) (char-to-string (cadr v)) ""))            (setq v (if (char-valid-p (cadr v)) (char-to-string (cadr v)) ""))
453            (if (stringp trans-c) (setq trans-c (list trans-c)))            (if (stringp trans-c) (setq trans-c (list trans-c)))
454            (if (stringp trans-v) (setq trans-v (list trans-v)))            (if (stringp trans-v) (setq trans-v (list trans-v)))
455            (indian--puthash-char            (indian--puthash-char
456             (concat c v)             (concat c v)
457             (apply 'append             (apply 'append
458                    (mapthread 'concat trans-c trans-v))                    (mapthread 'concat trans-c trans-v))
# Line 263  FUNCTION will be called 15 times." Line 462  FUNCTION will be called 15 times."
462    
463  (defun indian-make-hash (table trans-table)  (defun indian-make-hash (table trans-table)
464    "Indian Transliteration Hash for decode/encode"    "Indian Transliteration Hash for decode/encode"
465    (let* ((encode-hash (makehash 'equal))    (let* ((encode-hash (make-hash-table :test 'equal))
466           (decode-hash (makehash 'equal))           (decode-hash (make-hash-table :test 'equal))
467           (hashtbls (cons encode-hash decode-hash))           (hashtbls (cons encode-hash decode-hash))
468           (vowels     (elt table 0))           (vowels     (elt table 0))
469           (consonants (elt table 1))           (consonants (elt table 1))
# Line 277  FUNCTION will be called 15 times." Line 476  FUNCTION will be called 15 times."
476           (trans-digits  '("0" "1" "2" "3" "4" "5" "6" "7" "8" "9")))           (trans-digits  '("0" "1" "2" "3" "4" "5" "6" "7" "8" "9")))
477      (indian--puthash-v vowels trans-vowels hashtbls)      (indian--puthash-v vowels trans-vowels hashtbls)
478      (indian--puthash-c consonants trans-consonants halant hashtbls)      (indian--puthash-c consonants trans-consonants halant hashtbls)
479      (indian--puthash-cv consonants trans-consonants      (indian--puthash-cv consonants trans-consonants
480                                vowels trans-vowels hashtbls)                                vowels trans-vowels hashtbls)
481      (indian--puthash-m misc trans-misc hashtbls)      (indian--puthash-m misc trans-misc hashtbls)
482      (indian--puthash-m digits trans-digits hashtbls)      (indian--puthash-m digits trans-digits hashtbls)
# Line 293  FUNCTION will be called 15 times." Line 492  FUNCTION will be called 15 times."
492    (indian-make-hash indian-dev-base-table    (indian-make-hash indian-dev-base-table
493                            indian-aiba-table))                            indian-aiba-table))
494    
495    (defvar indian-pnj-itrans-v5-hash
496      (indian-make-hash indian-pnj-base-table
497                              indian-itrans-v5-table))
498    
499    (defvar indian-gjr-itrans-v5-hash
500      (indian-make-hash indian-gjr-base-table
501                              indian-itrans-v5-table))
502    
503    (defvar indian-ori-itrans-v5-hash
504      (indian-make-hash indian-ori-base-table
505                              indian-itrans-v5-table))
506    
507    (defvar indian-bng-itrans-v5-hash
508      (indian-make-hash indian-bng-base-table
509                              indian-itrans-v5-table))
510    
511    (defvar indian-asm-itrans-v5-hash
512      (indian-make-hash indian-asm-base-table
513                              indian-itrans-v5-table))
514    
515    (defvar indian-tlg-itrans-v5-hash
516      (indian-make-hash indian-tlg-base-table
517                              indian-itrans-v5-table))
518    
519    (defvar indian-knd-itrans-v5-hash
520      (indian-make-hash indian-knd-base-table
521                              indian-itrans-v5-table))
522    
523    (defvar indian-mlm-itrans-v5-hash
524      (indian-make-hash indian-mlm-base-table
525                              indian-itrans-v5-table))
526    
527    (defvar indian-tml-itrans-v5-hash
528      (indian-make-hash indian-tml-base-table
529                              indian-itrans-v5-table))
530  )  )
531    
532  (defmacro indian-translate-region (from to hashtable encode-p)  (defmacro indian-translate-region (from to hashtable encode-p)
533    `(save-excursion    `(save-excursion
534       (save-restriction       (save-restriction
535         (let ((regexp ,(indian-regexp-of-hashtbl-keys         (let ((regexp ,(indian-regexp-of-hashtbl-keys
536                         (if encode-p (car (eval hashtable))                         (if encode-p (car (eval hashtable))
537                           (cdr (eval hashtable))))))                           (cdr (eval hashtable))))))
538           (narrow-to-region from to)           (narrow-to-region from to)
539           (goto-char (point-min))           (goto-char (point-min))
540           (while (re-search-forward regexp nil t)           (while (re-search-forward regexp nil t)
541             (let ((matchstr (gethash (match-string 0)             (let ((matchstr (gethash (match-string 0)
542                                      (if ,encode-p                                      (if ,encode-p
543                                          (car ,hashtable)                                          (car ,hashtable)
544                                        (cdr ,hashtable)))))                                        (cdr ,hashtable)))))
# Line 314  FUNCTION will be called 15 times." Line 548  FUNCTION will be called 15 times."
548    
549  (defun indian-dev-itrans-v5-encode-region (from to)  (defun indian-dev-itrans-v5-encode-region (from to)
550    (interactive "r")    (interactive "r")
551    (indian-translate-region    (indian-translate-region
552     from to indian-dev-itrans-v5-hash t))     from to indian-dev-itrans-v5-hash t))
553    
554  (defun indian-dev-itrans-v5-decode-region (from to)  (defun indian-dev-itrans-v5-decode-region (from to)
# Line 324  FUNCTION will be called 15 times." Line 558  FUNCTION will be called 15 times."
558    
559  (defun indian-dev-kyoto-harvard-encode-region (from to)  (defun indian-dev-kyoto-harvard-encode-region (from to)
560    (interactive "r")    (interactive "r")
561    (indian-translate-region    (indian-translate-region
562     from to indian-dev-kyoto-harvard-hash t))     from to indian-dev-kyoto-harvard-hash t))
563    
564  (defun indian-dev-kyoto-harvard-decode-region (from to)  (defun indian-dev-kyoto-harvard-decode-region (from to)
# Line 334  FUNCTION will be called 15 times." Line 568  FUNCTION will be called 15 times."
568    
569  (defun indian-dev-aiba-encode-region (from to)  (defun indian-dev-aiba-encode-region (from to)
570    (interactive "r")    (interactive "r")
571    (indian-translate-region    (indian-translate-region
572     from to indian-dev-aiba-hash t))     from to indian-dev-aiba-hash t))
573    
574  (defun indian-dev-aiba-decode-region (from to)  (defun indian-dev-aiba-decode-region (from to)
# Line 525  FUNCTION will be called 15 times." Line 759  FUNCTION will be called 15 times."
759  (defvar is13194-to-ucs-malayalam-hashtbl nil)  (defvar is13194-to-ucs-malayalam-hashtbl nil)
760  (defvar is13194-to-ucs-malayalam-regexp nil)  (defvar is13194-to-ucs-malayalam-regexp nil)
761    
762  (mapc  (mapc
763   (function (lambda (script)   (function (lambda (script)
764     (let ((hashtable (intern (concat "is13194-to-ucs-"     (let ((hashtable (intern (concat "is13194-to-ucs-"
765                                      (symbol-name script) "-hashtbl" )))                                      (symbol-name script) "-hashtbl" )))
766           (regexp    (intern (concat "is13194-to-ucs-"           (regexp    (intern (concat "is13194-to-ucs-"
767                                      (symbol-name script) "-regexp"))))                                      (symbol-name script) "-regexp"))))
768       (set hashtable (make-hash-table :test 'equal :size 128))       (set hashtable (make-hash-table :test 'equal :size 128))
769       (mapc       (mapc
770        (function (lambda (x)        (function (lambda (x)
771          (put-char-code-property (decode-char 'ucs (car x))          (put-char-code-property (decode-char 'ucs (car x))
772                                  'script script)                                  'script script)
773          (put-char-code-property (decode-char 'ucs (car x))          (put-char-code-property (decode-char 'ucs (car x))
774                                  'iscii (cdr x))                                  'iscii (cdr x))
775          (puthash (cdr x) (char-to-string (decode-char 'ucs (car x)))          (puthash (cdr x) (char-to-string (decode-char 'ucs (car x)))
776                   (eval hashtable))))                   (eval hashtable))))
# Line 553  FUNCTION will be called 15 times." Line 787  FUNCTION will be called 15 times."
787    "Regexp that matches to conversion")    "Regexp that matches to conversion")
788    
789  (defun ucs-to-iscii-region (from to)  (defun ucs-to-iscii-region (from to)
790    "Converts the indian UCS characters in the region to ISCII.      "Converts the indian UCS characters in the region to ISCII.
791  Returns new end position."  Returns new end position."
792    (interactive "r")    (interactive "r")
793    ;; only Devanagari is supported now.    ;; only Devanagari is supported now.
# Line 563  Returns new end position." Line 797  Returns new end position."
797        (goto-char (point-min))        (goto-char (point-min))
798        (let* ((current-repertory is13194-default-repartory))        (let* ((current-repertory is13194-default-repartory))
799          (while (re-search-forward ucs-to-is13194-regexp nil t)          (while (re-search-forward ucs-to-is13194-regexp nil t)
800            (replace-match            (replace-match
801             (get-char-code-property (string-to-char (match-string 0))             (get-char-code-property (string-to-char (match-string 0))
802                                     'iscii))))                                     'iscii))))
803        (point-max))))        (point-max))))
804    
805  (defun iscii-to-ucs-region (from to)  (defun iscii-to-ucs-region (from to)
806    "Converts the ISCII characters in the region to UCS.      "Converts the ISCII characters in the region to UCS.
807  Returns new end position."  Returns new end position."
808    (interactive "r")    (interactive "r")
809    ;; only Devanagari is supported now.    ;; only Devanagari is supported now.
# Line 579  Returns new end position." Line 813  Returns new end position."
813        (goto-char (point-min))        (goto-char (point-min))
814        (let* ((current-repertory is13194-default-repartory)        (let* ((current-repertory is13194-default-repartory)
815               (current-hashtable               (current-hashtable
816                (intern (concat "is13194-to-ucs-"                (intern (concat "is13194-to-ucs-"
817                                (symbol-name current-repertory) "-hashtbl")))                                (symbol-name current-repertory) "-hashtbl")))
818               (current-regexp               (current-regexp
819                (intern (concat "is13194-to-ucs-"                (intern (concat "is13194-to-ucs-"
820                                (symbol-name current-repertory) "-regexp"))))                                (symbol-name current-repertory) "-regexp"))))
821          (while (re-search-forward (eval current-regexp) nil t)          (while (re-search-forward (eval current-regexp) nil t)
822            (replace-match            (replace-match
823             (gethash (match-string 0) (eval current-hashtable) ""))))             (gethash (match-string 0) (eval current-hashtable) ""))))
824        (point-max))))        (point-max))))
825    
# Line 603  Returns new end position." Line 837  Returns new end position."
837    
838  ;;;###autoload  ;;;###autoload
839  (defun indian-compose-string (string)  (defun indian-compose-string (string)
840    (with-temp-buffer    (with-temp-buffer
841      (insert string)      (insert string)
842      (indian-compose-region (point-min) (point-max))      (indian-compose-region (point-min) (point-max))
843      (buffer-string)))      (buffer-string)))
# Line 1029  See also the function `indian-glyph-char Line 1263  See also the function `indian-glyph-char
1263          (error "Invalid indian-glyph char: %d" char))          (error "Invalid indian-glyph char: %d" char))
1264      (setq code (+ (* (- (nth 1 split) 32) 96) (nth 2 split) -32))      (setq code (+ (* (- (nth 1 split) 32) 96) (nth 2 split) -32))
1265      (cons (% code 256) (aref indian-script-table (/ code 256)))))      (cons (% code 256) (aref indian-script-table (/ code 256)))))
1266        
1267  (provide 'ind-util)  (provide 'ind-util)
1268    
1269  ;;; ind-util.el ends here  ;;; ind-util.el ends here

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.5.4.1

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