aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love2002-09-08 20:36:10 +0000
committerDave Love2002-09-08 20:36:10 +0000
commit0b520940e63bd347502ece7ec2092163a2ca987e (patch)
tree390990189d912a1e11d4a5460d6349279ea9c803
parent97b4eba94a736d2946382db0570b8c5c1536cac7 (diff)
downloademacs-0b520940e63bd347502ece7ec2092163a2ca987e.tar.gz
emacs-0b520940e63bd347502ece7ec2092163a2ca987e.zip
(dev-charseq): Avoid indian-glyph-char.
-rw-r--r--lisp/ChangeLog11
-rw-r--r--lisp/language/devan-util.el434
2 files changed, 228 insertions, 217 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index cae85b754a6..fecd8419d17 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,16 @@
12002-09-08 Dave Love <fx@gnu.org> 12002-09-08 Dave Love <fx@gnu.org>
2 2
3 * language/ind-util.el (ucs-devanagari-to-is13194-alist)
4 (indian-glyph-char, indian-char-glyph): Deleted.
5 (is13194-default-repertory): Renamed from
6 is13194-default-repartory,
7 (iscii-to-ucs-region): Hoist evals from loop.
8
9 * language/devan-util.el (dev-charseq): Avoid indian-glyph-char.
10
11 * language/indian.el (indian-script-table)
12 (ccl-encode-indian-glyph-font): Deleted.
13
3 * international/mule-conf.el (emacs-mule, iso-2022-7bit) 14 * international/mule-conf.el (emacs-mule, iso-2022-7bit)
4 (iso-2022-7bit-ss2, iso-2022-7bit-lock, iso-2022-8bit-ss2) 15 (iso-2022-7bit-ss2, iso-2022-7bit-lock, iso-2022-8bit-ss2)
5 (compound-text, ctext-no-compositions): Remove :charset-list. 16 (compound-text, ctext-no-compositions): Remove :charset-list.
diff --git a/lisp/language/devan-util.el b/lisp/language/devan-util.el
index 73fea21d5ac..10eef8231bf 100644
--- a/lisp/language/devan-util.el
+++ b/lisp/language/devan-util.el
@@ -52,7 +52,7 @@
52 "[$,15U(B-$,15y68(B-$,16?(B]") 52 "[$,15U(B-$,15y68(B-$,16?(B]")
53 53
54(defconst devanagari-composable-pattern 54(defconst devanagari-composable-pattern
55 (concat 55 (concat
56 "\\([$,15E(B-$,15T6@6A(B][$,15A5B(B]?\\)\\|$,15C(B" 56 "\\([$,15E(B-$,15T6@6A(B][$,15A5B(B]?\\)\\|$,15C(B"
57 "\\|\\(" 57 "\\|\\("
58 "\\(?:\\(?:[$,15U(B-$,15y68(B-$,16?(B]$,16-(B\\)?\\(?:[$,15U(B-$,15y68(B-$,16?(B]$,16-(B\\)?\\(?:[$,15U(B-$,15y68(B-$,16?(B]$,16-(B\\)?[$,15U(B-$,15y68(B-$,16?(B]$,16-(B\\)?" 58 "\\(?:\\(?:[$,15U(B-$,15y68(B-$,16?(B]$,16-(B\\)?\\(?:[$,15U(B-$,15y68(B-$,16?(B]$,16-(B\\)?\\(?:[$,15U(B-$,15y68(B-$,16?(B]$,16-(B\\)?[$,15U(B-$,15y68(B-$,16?(B]$,16-(B\\)?"
@@ -67,8 +67,8 @@
67 (narrow-to-region from to) 67 (narrow-to-region from to)
68 (goto-char (point-min)) 68 (goto-char (point-min))
69 (while (re-search-forward devanagari-composable-pattern nil t) 69 (while (re-search-forward devanagari-composable-pattern nil t)
70 (devanagari-compose-syllable-region (match-beginning 0) 70 (devanagari-compose-syllable-region (match-beginning 0)
71 (match-end 0)))))) 71 (match-end 0))))))
72(defun devanagari-compose-string (string) 72(defun devanagari-compose-string (string)
73 (with-temp-buffer 73 (with-temp-buffer
74 (insert (decompose-string string)) 74 (insert (decompose-string string))
@@ -86,14 +86,14 @@
86 86
87(defun devanagari-range (from to) 87(defun devanagari-range (from to)
88 "Make the list of the integers of range FROM to TO." 88 "Make the list of the integers of range FROM to TO."
89 (let (result) 89 (let (result)
90 (while (<= from to) (setq result (cons to result) to (1- to))) result)) 90 (while (<= from to) (setq result (cons to result) to (1- to))) result))
91 91
92(defun devanagari-regexp-of-hashtbl-keys (hashtbl) 92(defun devanagari-regexp-of-hashtbl-keys (hashtbl)
93 "Return a regular expression that matches all keys in hashtable HASHTBL." 93 "Return a regular expression that matches all keys in hashtable HASHTBL."
94 (let ((max-specpdl-size 1000)) 94 (let ((max-specpdl-size 1000))
95 (regexp-opt 95 (regexp-opt
96 (sort 96 (sort
97 (let (dummy) 97 (let (dummy)
98 (maphash (function (lambda (key val) (setq dummy (cons key dummy)))) hashtbl) 98 (maphash (function (lambda (key val) (setq dummy (cons key dummy)))) hashtbl)
99 dummy) 99 dummy)
@@ -111,13 +111,13 @@ PATTERN regexp."
111(mapc 111(mapc
112 (function (lambda (ucs) 112 (function (lambda (ucs)
113 (aset composition-function-table ucs 113 (aset composition-function-table ucs
114 (list (cons devanagari-composable-pattern 114 (list (cons devanagari-composable-pattern
115 'devanagari-composition-function))))) 115 'devanagari-composition-function)))))
116 (nconc '(#x0903) (devanagari-range #x0905 #x0939) (devanagari-range #x0958 #x0961))) 116 (nconc '(#x0903) (devanagari-range #x0905 #x0939) (devanagari-range #x0958 #x0961)))
117 117
118;; Notes on conversion steps. 118;; Notes on conversion steps.
119 119
120;; 1. chars to glyphs 120;; 1. chars to glyphs
121;; 121;;
122;; Rules will not be applied to the halant appeared at the end of the 122;; Rules will not be applied to the halant appeared at the end of the
123;; text. Also, the preceding/following "r" will be treated as special case. 123;; text. Also, the preceding/following "r" will be treated as special case.
@@ -130,8 +130,8 @@ PATTERN regexp."
130;; Note that `consonant-glyph' mentioned here does not contain the 130;; Note that `consonant-glyph' mentioned here does not contain the
131;; vertical bar (right modifier) attached at the right of the 131;; vertical bar (right modifier) attached at the right of the
132;; consonant. 132;; consonant.
133;; 133;;
134;; If the glyph-group contains right modifier, 134;; If the glyph-group contains right modifier,
135;; (1) consonant-glyphs/vowels, with nukta sign 135;; (1) consonant-glyphs/vowels, with nukta sign
136;; (2) spacing 136;; (2) spacing
137;; (3) right modifier (may be matra) 137;; (3) right modifier (may be matra)
@@ -140,11 +140,11 @@ PATTERN regexp."
140;; (6) anuswar 140;; (6) anuswar
141;; (7) following "r" 141;; (7) following "r"
142;; (8) bottom matra or halant. 142;; (8) bottom matra or halant.
143;; 143;;
144;; Otherwise, 144;; Otherwise,
145;; (1) consonant-glyph/vowels, with nukta sign 145;; (1) consonant-glyph/vowels, with nukta sign
146;; (3) left matra 146;; (3) left matra
147;; (4) top matra 147;; (4) top matra
148;; (5) preceding "r" 148;; (5) preceding "r"
149;; (6) anuswar 149;; (6) anuswar
150;; (7) following "r" 150;; (7) following "r"
@@ -186,15 +186,15 @@ PATTERN regexp."
186 ("$,15M5A(B" . "$,4 b"$(B") 186 ("$,15M5A(B" . "$,4 b"$(B")
187 ("$,15M5B(B" . "$,4 b"$(B") 187 ("$,15M5B(B" . "$,4 b"$(B")
188 ("$,16%(B" . "\$,4"L(B") 188 ("$,16%(B" . "\$,4"L(B")
189 ("$,15N(B" . "$,4 b"@(B") 189 ("$,15N(B" . "$,4 b"@(B")
190 ("$,15N5A(B" . "$,4 b"@"&(B") 190 ("$,15N5A(B" . "$,4 b"@"&(B")
191 ("$,16&(B" . "\$,4"@(B") 191 ("$,16&(B" . "\$,4"@(B")
192 ("$,16&5A(B" . "\$,4"@(B\$,4"&(B") 192 ("$,16&5A(B" . "\$,4"@(B\$,4"&(B")
193 ("$,15O(B" . "$,4 b(B") 193 ("$,15O(B" . "$,4 b(B")
194 ("$,16'(B" . "\$,4"D(B") 194 ("$,16'(B" . "\$,4"D(B")
195 ("$,16'5A(B" . "\$,4"D(B\$,4"&(B") 195 ("$,16'5A(B" . "\$,4"D(B\$,4"&(B")
196 ("$,15P(B" . "$,4 b"D(B") 196 ("$,15P(B" . "$,4 b"D(B")
197 ("$,15P5A(B" . "$,4 b"D"&(B") 197 ("$,15P5A(B" . "$,4 b"D"&(B")
198 ("$,16((B" . "\$,4"H(B") 198 ("$,16((B" . "\$,4"H(B")
199 ("$,16(5A(B" . "\$,4"H(B\$,4"&(B") 199 ("$,16(5A(B" . "\$,4"H(B\$,4"&(B")
200 ("$,15Q(B" . "$,4 K")"L(B") ;; special rule for reodering. 200 ("$,15Q(B" . "$,4 K")"L(B") ;; special rule for reodering.
@@ -203,21 +203,21 @@ PATTERN regexp."
203 ("$,16)(B" . "\$,4")"L(B") 203 ("$,16)(B" . "\$,4")"L(B")
204 ("$,16)5A(B" . "\$,4")"$(B") 204 ("$,16)5A(B" . "\$,4")"$(B")
205 ("$,16)5B(B" . "\$,4")"$(B") 205 ("$,16)5B(B" . "\$,4")"$(B")
206 ("$,15R(B" . "$,4 K")"@(B") 206 ("$,15R(B" . "$,4 K")"@(B")
207 ("$,15R5A(B" . "$,4 K")"@"&(B") 207 ("$,15R5A(B" . "$,4 K")"@"&(B")
208 ("$,16*(B" . "\$,4")"@(B") 208 ("$,16*(B" . "\$,4")"@(B")
209 ("$,16*5A(B" . "\$,4")"@"&(B") 209 ("$,16*5A(B" . "\$,4")"@"&(B")
210 ("$,15S(B" . "$,4 K")"D(B") 210 ("$,15S(B" . "$,4 K")"D(B")
211 ("$,15S5A(B" . "$,4 K")"D"&(B") 211 ("$,15S5A(B" . "$,4 K")"D"&(B")
212 ("$,16+(B" . "\$,4")"D(B") 212 ("$,16+(B" . "\$,4")"D(B")
213 ("$,16+5A(B" . "\$,4")"D"&(B") 213 ("$,16+5A(B" . "\$,4")"D"&(B")
214 ("$,15T(B" . "$,4 K")"H(B") 214 ("$,15T(B" . "$,4 K")"H(B")
215 ("$,15T5A(B" . "$,4 K")"H"&(B") 215 ("$,15T5A(B" . "$,4 K")"H"&(B")
216 ("$,16,(B" . "\$,4")"H(B") 216 ("$,16,(B" . "\$,4")"H(B")
217 ("$,16,5A(B" . "\$,4")"H"&(B") 217 ("$,16,5A(B" . "\$,4")"H"&(B")
218 ("$,16@(B" . "$,4 a"Q(B") 218 ("$,16@(B" . "$,4 a"Q(B")
219 ;;("$,16B(B" . nil) 219 ;;("$,16B(B" . nil)
220 ;;("$,16A(B" . nil) 220 ;;("$,16A(B" . nil)
221 ;;("$,16C(B" . nil) 221 ;;("$,16C(B" . nil)
222 222
223 ;; GRUTTALS 223 ;; GRUTTALS
@@ -233,69 +233,69 @@ PATTERN regexp."
233 ("$,15V6-5p(B" . "$,4 l")(B") 233 ("$,15V6-5p(B" . "$,4 l")(B")
234 ("$,15V6-5p6-(B" . "$,4 l(B") 234 ("$,15V6-5p6-(B" . "$,4 l(B")
235 235
236 ("$,15W(B" . "$,4 m")(B") 236 ("$,15W(B" . "$,4 m")(B")
237 ("$,15W6-(B" . "$,4 m(B") 237 ("$,15W6-(B" . "$,4 m(B")
238 ("$,15W6-5p(B" . "$,4 o")(B") 238 ("$,15W6-5p(B" . "$,4 o")(B")
239 ("$,15W6-5p6-(B" . "$,4 o(B") 239 ("$,15W6-5p6-(B" . "$,4 o(B")
240 240
241 ("$,15X(B" . "$,4 p")(B") 241 ("$,15X(B" . "$,4 p")(B")
242 ("$,15X6-(B" . "$,4 p(B") 242 ("$,15X6-(B" . "$,4 p(B")
243 ("$,15X6-5p(B" . "$,4 q")(B") 243 ("$,15X6-5p(B" . "$,4 q")(B")
244 ("$,15X6-5p6-(B" . "$,4 q(B") 244 ("$,15X6-5p6-(B" . "$,4 q(B")
245 245
246 ("$,15Y(B" . "$,4 r"S(B") 246 ("$,15Y(B" . "$,4 r"S(B")
247 ;; PALATALS 247 ;; PALATALS
248 ("$,15Z(B" . "$,4 s")(B") 248 ("$,15Z(B" . "$,4 s")(B")
249 ("$,15Z6-(B" . "$,4 s(B") 249 ("$,15Z6-(B" . "$,4 s(B")
250 ("$,15Z6-5p(B" . "$,4 t")(B") 250 ("$,15Z6-5p(B" . "$,4 t")(B")
251 ("$,15Z6-5p6-(B" . "$,4 t(B") 251 ("$,15Z6-5p6-(B" . "$,4 t(B")
252 252
253 ("$,15[(B" . "$,4 u"T(B") 253 ("$,15[(B" . "$,4 u"T(B")
254 254
255 ("$,15\(B" . "$,4 v")(B") 255 ("$,15\(B" . "$,4 v")(B")
256 ("$,15\6-(B" . "$,4 v(B") 256 ("$,15\6-(B" . "$,4 v(B")
257 ("$,15\6-5p(B" . "$,4 x")(B") 257 ("$,15\6-5p(B" . "$,4 x")(B")
258 ("$,15\6-5p6-(B" . "$,4 x(B") 258 ("$,15\6-5p6-(B" . "$,4 x(B")
259 ("$,15\6-5^(B" . "$,4 y")(B") 259 ("$,15\6-5^(B" . "$,4 y")(B")
260 ("$,15\6-5^6-(B" . "$,4 y(B") 260 ("$,15\6-5^6-(B" . "$,4 y(B")
261 261
262 ("$,15](B" . "$,4 z")(B") 262 ("$,15](B" . "$,4 z")(B")
263 ("$,15]6-(B" . "$,4 z(B") 263 ("$,15]6-(B" . "$,4 z(B")
264 ("$,15]6-5p(B" . "$,4 {")(B") 264 ("$,15]6-5p(B" . "$,4 {")(B")
265 ("$,15]6-5p6-(B" . "$,4 {(B") 265 ("$,15]6-5p6-(B" . "$,4 {(B")
266 266
267 ("$,15^(B" . "$,4 |")(B") 267 ("$,15^(B" . "$,4 |")(B")
268 ("$,15^6-(B" . "$,4 |(B") 268 ("$,15^6-(B" . "$,4 |(B")
269 ;; CEREBRALS 269 ;; CEREBRALS
270 ("$,15_(B" . "$,4 }"U(B") 270 ("$,15_(B" . "$,4 }"U(B")
271 ("$,15_6-5_(B" . "$,4 ~"U(B") 271 ("$,15_6-5_(B" . "$,4 ~"U(B")
272 ("$,15_6-5`(B" . "$,4 "U(B") 272 ("$,15_6-5`(B" . "$,4 "U(B")
273 273
274 ("$,15`(B" . "$,4! "V(B") 274 ("$,15`(B" . "$,4! "V(B")
275 ("$,15`6-5`(B" . "$,4!!"V(B") 275 ("$,15`6-5`(B" . "$,4!!"V(B")
276 276
277 ("$,15a(B" . "$,4!""W(B") 277 ("$,15a(B" . "$,4!""W(B")
278 ("$,15a6-5a(B" . "$,4!$"W(B") 278 ("$,15a6-5a(B" . "$,4!$"W(B")
279 ("$,15a6-5b(B" . "$,4!%"W(B") 279 ("$,15a6-5b(B" . "$,4!%"W(B")
280 280
281 ("$,15b(B" . "$,4!&"X(B") 281 ("$,15b(B" . "$,4!&"X(B")
282 282
283 ("$,15c(B" . "$,4!(")(B") 283 ("$,15c(B" . "$,4!(")(B")
284 ("$,15c6-(B" . "$,4!((B") 284 ("$,15c6-(B" . "$,4!((B")
285 ;; DENTALS 285 ;; DENTALS
286 ("$,15d(B" . "$,4!)")(B") 286 ("$,15d(B" . "$,4!)")(B")
287 ("$,15d6-(B" . "$,4!)(B") 287 ("$,15d6-(B" . "$,4!)(B")
288 ("$,15d6-5p(B" . "$,4!*")(B") 288 ("$,15d6-5p(B" . "$,4!*")(B")
289 ("$,15d6-5p6-(B" . "$,4!*(B") 289 ("$,15d6-5p6-(B" . "$,4!*(B")
290 ("$,15d6-5d(B" . "$,4!+")(B") 290 ("$,15d6-5d(B" . "$,4!+")(B")
291 ("$,15d6-5d6-(B" . "$,4!+(B") 291 ("$,15d6-5d6-(B" . "$,4!+(B")
292 292
293 ("$,15e(B" . "$,4!,")(B") 293 ("$,15e(B" . "$,4!,")(B")
294 ("$,15e6-(B" . "$,4!,(B") 294 ("$,15e6-(B" . "$,4!,(B")
295 ("$,15e6-5p(B" . "$,4!-")(B") 295 ("$,15e6-5p(B" . "$,4!-")(B")
296 ("$,15e6-5p6-(B" . "$,4!-(B") 296 ("$,15e6-5p6-(B" . "$,4!-(B")
297 297
298 ("$,15f(B" . "$,4!."Y(B") 298 ("$,15f(B" . "$,4!."Y(B")
299 ("$,15f6#(B" . "$,4!/"Y(B") 299 ("$,15f6#(B" . "$,4!/"Y(B")
300 ("$,15f6-5p(B" . "$,4!0"Y(B") 300 ("$,15f6-5p(B" . "$,4!0"Y(B")
301 ("$,15f6-5f(B" . "$,4!1"Y(B") 301 ("$,15f6-5f(B" . "$,4!1"Y(B")
@@ -304,61 +304,61 @@ PATTERN regexp."
304 ("$,15f6-5o(B" . "$,4!4(B") 304 ("$,15f6-5o(B" . "$,4!4(B")
305 ("$,15f6-5u(B" . "$,4!5"Y(B") 305 ("$,15f6-5u(B" . "$,4!5"Y(B")
306 306
307 ("$,15g(B" . "$,4!6")(B") 307 ("$,15g(B" . "$,4!6")(B")
308 ("$,15g6-(B" . "$,4!6(B") 308 ("$,15g6-(B" . "$,4!6(B")
309 ("$,15g6-5p(B" . "$,4!7")(B") 309 ("$,15g6-5p(B" . "$,4!7")(B")
310 ("$,15g6-5p6-(B" . "$,4!7(B") 310 ("$,15g6-5p6-(B" . "$,4!7(B")
311 311
312 ("$,15h(B" . "$,4!8")(B") 312 ("$,15h(B" . "$,4!8")(B")
313 ("$,15h6-(B" . "$,4!8(B") 313 ("$,15h6-(B" . "$,4!8(B")
314 ("$,15h6-5p(B" . "$,4!9")(B") 314 ("$,15h6-5p(B" . "$,4!9")(B")
315 ("$,15h6-5p6-(B" . "$,4!9")(B") 315 ("$,15h6-5p6-(B" . "$,4!9")(B")
316 ("$,15h6-5h(B" . "$,4!:")(B") 316 ("$,15h6-5h(B" . "$,4!:")(B")
317 ("$,15h6-5h6-(B" . "$,4!:(B") 317 ("$,15h6-5h6-(B" . "$,4!:(B")
318 318
319 ("$,15i(B" . "$,4!8"#")(B") 319 ("$,15i(B" . "$,4!8"#")(B")
320 ;; LABIALS 320 ;; LABIALS
321 ("$,15j(B" . "$,4!;")(B") 321 ("$,15j(B" . "$,4!;")(B")
322 ("$,15j6-(B" . "$,4!;(B") 322 ("$,15j6-(B" . "$,4!;(B")
323 ("$,15j6-5p(B" . "$,4!<")(B") 323 ("$,15j6-5p(B" . "$,4!<")(B")
324 ("$,15j6-5p6-(B" . "$,4!<(B") 324 ("$,15j6-5p6-(B" . "$,4!<(B")
325 325
326 ("$,15k(B" . "$,4!a"[(B") 326 ("$,15k(B" . "$,4!a"[(B")
327 ("$,15k6-(B" . "$,4!=(B") 327 ("$,15k6-(B" . "$,4!=(B")
328 ("$,15k6-5p(B" . "$,4!c"[(B") 328 ("$,15k6-5p(B" . "$,4!c"[(B")
329 329
330 ("$,15l(B" . "$,4!d")(B") 330 ("$,15l(B" . "$,4!d")(B")
331 ("$,15l6-(B" . "$,4!d(B") 331 ("$,15l6-(B" . "$,4!d(B")
332 ("$,15l6-5p(B" . "$,4!e")(B") 332 ("$,15l6-5p(B" . "$,4!e")(B")
333 ("$,15l6-5p6-(B" . "$,4!e(B") 333 ("$,15l6-5p6-(B" . "$,4!e(B")
334 334
335 ("$,15m(B" . "$,4!f")(B") 335 ("$,15m(B" . "$,4!f")(B")
336 ("$,15m6-(B" . "$,4!f(B") 336 ("$,15m6-(B" . "$,4!f(B")
337 ("$,15m6-5p(B" . "$,4!g")(B") 337 ("$,15m6-5p(B" . "$,4!g")(B")
338 ("$,15m6-5p6-(B" . "$,4!g(B") 338 ("$,15m6-5p6-(B" . "$,4!g(B")
339 339
340 ("$,15n(B" . "$,4!h")(B") 340 ("$,15n(B" . "$,4!h")(B")
341 ("$,15n6-(B" . "$,4!h(B") 341 ("$,15n6-(B" . "$,4!h(B")
342 ("$,15n6-5p(B" . "$,4!i")(B") 342 ("$,15n6-5p(B" . "$,4!i")(B")
343 ("$,15n6-5p6-(B" . "$,4!i(B") 343 ("$,15n6-5p6-(B" . "$,4!i(B")
344 ;; SEMIVOWELS 344 ;; SEMIVOWELS
345 ("$,15o(B" . "$,4!j")(B") 345 ("$,15o(B" . "$,4!j")(B")
346 ("$,15o6-(B" . "$,4!j(B") 346 ("$,15o6-(B" . "$,4!j(B")
347 ("$,15o6-5p(B" . "$,4!k")(B") 347 ("$,15o6-5p(B" . "$,4!k")(B")
348 ("$,15o6-5p6-(B" . "$,4!k(B") 348 ("$,15o6-5p6-(B" . "$,4!k(B")
349 ("$,16-5o(B" . "$,4!l(B") ;; when every ohter lig. fails. 349 ("$,16-5o(B" . "$,4!l(B") ;; when every ohter lig. fails.
350 350
351 ("$,15p(B" . "$,4!n"W(B") 351 ("$,15p(B" . "$,4!n"W(B")
352 ;; ("$,15p6-(B" . "\$,4"'(B") ;; special case. only the topmost pos. 352 ;; ("$,15p6-(B" . "\$,4"'(B") ;; special case. only the topmost pos.
353 ("$,15q(B" . "$,4!n"#"W(B") 353 ("$,15q(B" . "$,4!n"#"W(B")
354 ("$,15q6-(B" . "$,4!m(B") ;; IS 13194 speical rule. 354 ("$,15q6-(B" . "$,4!m(B") ;; IS 13194 speical rule.
355 ("$,15p6!(B" . "$,4!o"[(B") 355 ("$,15p6!(B" . "$,4!o"[(B")
356 ("$,15p6"(B" . "$,4!p"\(B") 356 ("$,15p6"(B" . "$,4!p"\(B")
357 357
358 ("$,15r(B" . "$,4!q")(B") 358 ("$,15r(B" . "$,4!q")(B")
359 ("$,15r6-(B" . "$,4!q(B") 359 ("$,15r6-(B" . "$,4!q(B")
360 ("$,15s(B" . "$,4!s(B") 360 ("$,15s(B" . "$,4!s(B")
361 ("$,15s6-(B" . "$,4!r(B") 361 ("$,15s6-(B" . "$,4!r(B")
362 ("$,15t(B" . "$,4!s"#(B") 362 ("$,15t(B" . "$,4!s"#(B")
363 ("$,15t6-(B" . "$,4!r"#(B") 363 ("$,15t6-(B" . "$,4!r"#(B")
364 364
@@ -366,8 +366,8 @@ PATTERN regexp."
366 ("$,15u6-(B" . "$,4!t(B") 366 ("$,15u6-(B" . "$,4!t(B")
367 ("$,15u6-5p(B" . "$,4!u")(B") 367 ("$,15u6-5p(B" . "$,4!u")(B")
368 ("$,15u6-5p6-(B" . "$,4!u(B") 368 ("$,15u6-5p6-(B" . "$,4!u(B")
369 ;; SIBILANTS 369 ;; SIBILANTS
370 ("$,15v(B" . "$,4!v")(B") 370 ("$,15v(B" . "$,4!v")(B")
371 ("$,15v6-(B" . "$,4!v(B") 371 ("$,15v6-(B" . "$,4!v(B")
372 ("$,15v6-5u(B" . "$,4!w")(B") 372 ("$,15v6-5u(B" . "$,4!w")(B")
373 ("$,15v6-5u6-(B" . "$,4!w(B") 373 ("$,15v6-5u6-(B" . "$,4!w(B")
@@ -387,42 +387,42 @@ PATTERN regexp."
387 ("$,15y6-5p(B" . "$,4!(B") 387 ("$,15y6-5p(B" . "$,4!(B")
388 ("$,15y6-5n(B" . "$,4" (B") 388 ("$,15y6-5n(B" . "$,4" (B")
389 ("$,15y6-5o(B" . "$,4"!(B") 389 ("$,15y6-5o(B" . "$,4"!(B")
390 ;; NUKTAS 390 ;; NUKTAS
391 ("$,168(B" . "$,4 f"R"S(B") 391 ("$,168(B" . "$,4 f"R"S(B")
392 ("$,1686-(B" . "$,4 d(B") 392 ("$,1686-(B" . "$,4 d(B")
393 ("$,169(B" . "$,4 k")(B") 393 ("$,169(B" . "$,4 k")(B")
394 ("$,1696-(B" . "$,4 k(B") 394 ("$,1696-(B" . "$,4 k(B")
395 ("$,16:(B" . "$,4 n")(B") 395 ("$,16:(B" . "$,4 n")(B")
396 ("$,16:6-(B" . "$,4 n(B") 396 ("$,16:6-(B" . "$,4 n(B")
397 ("$,16;(B" . "$,4 w")(B") 397 ("$,16;(B" . "$,4 w")(B")
398 ("$,16;6-(B" . "$,4 w(B") 398 ("$,16;6-(B" . "$,4 w(B")
399 ("$,16<(B" . "$,4!#"W(B") 399 ("$,16<(B" . "$,4!#"W(B")
400 ("$,16=(B" . "$,4!'"X(B") 400 ("$,16=(B" . "$,4!'"X(B")
401 ("$,16>(B" . "$,4!b"[(B") 401 ("$,16>(B" . "$,4!b"[(B")
402 ("$,16>6-(B" . "$,4!>(B") 402 ("$,16>6-(B" . "$,4!>(B")
403 ("$,16?(B" . "$,4!j"#")(B") 403 ("$,16?(B" . "$,4!j"#")(B")
404 ;; misc modifiers. 404 ;; misc modifiers.
405 ("$,15A(B" . "\$,4"$(B") 405 ("$,15A(B" . "\$,4"$(B")
406 ("$,15B(B" . "\$,4"&(B") 406 ("$,15B(B" . "\$,4"&(B")
407 ("$,15C(B" . "$,4 F(B") 407 ("$,15C(B" . "$,4 F(B")
408 ("$,15|(B" . "$,4"#(B") 408 ("$,15|(B" . "$,4"#(B")
409 ("$,15}(B" . "$,4 E(B") 409 ("$,15}(B" . "$,4 E(B")
410 ("$,16-(B" . "$,4""(B") 410 ("$,16-(B" . "$,4""(B")
411 ("$,16-5p(B" . "$,4"%(B") ;; following "r" 411 ("$,16-5p(B" . "$,4"%(B") ;; following "r"
412 ;; ("$,160(B" . "$,4 D(B") 412 ;; ("$,160(B" . "$,4 D(B")
413 ;; ("$,16D(B" . "$,4 J(B") 413 ;; ("$,16D(B" . "$,4 J(B")
414 ;; ("$,16F(B" . "") 414 ;; ("$,16F(B" . "")
415 ;; ("$,16G(B" . "") 415 ;; ("$,16G(B" . "")
416 ;; ("$,16H(B" . "") 416 ;; ("$,16H(B" . "")
417 ;; ("$,16I(B" . "") 417 ;; ("$,16I(B" . "")
418 ;; ("$,16J(B" . "") 418 ;; ("$,16J(B" . "")
419 ;; ("$,16K(B" . "") 419 ;; ("$,16K(B" . "")
420 ;; ("$,16L(B" . "") 420 ;; ("$,16L(B" . "")
421 ;; ("$,16M(B" . "") 421 ;; ("$,16M(B" . "")
422 ;; ("$,16N(B" . "") 422 ;; ("$,16N(B" . "")
423 ;; ("$,16O(B" . "") 423 ;; ("$,16O(B" . "")
424 ) 424 )
425 "Devanagari characters to glyphs conversion table. 425 "Devanagari characters to glyphs conversion table.
426Default value contains only the basic rules. You may add your own 426Default value contains only the basic rules. You may add your own
427preferred rule from the sanskrit fonts." ) 427preferred rule from the sanskrit fonts." )
428 428
@@ -436,7 +436,7 @@ preferred rule from the sanskrit fonts." )
436 (devanagari-regexp-of-hashtbl-keys dev-char-glyph-hash)) 436 (devanagari-regexp-of-hashtbl-keys dev-char-glyph-hash))
437 437
438;; glyph-to-glyph conversion table. 438;; glyph-to-glyph conversion table.
439;; it is supposed that glyphs are ordered in 439;; it is supposed that glyphs are ordered in
440;; [consonant/nukta] - [matra/halant] - [preceding-r] - [anuswar]. 440;; [consonant/nukta] - [matra/halant] - [preceding-r] - [anuswar].
441 441
442(defvar dev-glyph-glyph 442(defvar dev-glyph-glyph
@@ -493,11 +493,11 @@ preferred rule from the sanskrit fonts." )
493 493
494(defun dev-charseq (from &optional to) 494(defun dev-charseq (from &optional to)
495 (if (null to) (setq to from)) 495 (if (null to) (setq to from))
496 (mapcar (function (lambda (x) (indian-glyph-char x 'devanagari))) 496 (devanagari-range (make-char 'devanagari-glyph from)
497 (devanagari-range from to))) 497 (make-char 'devanagari-glyph to)))
498 498
499(defvar dev-glyph-cvn 499(defvar dev-glyph-cvn
500 (append 500 (append
501 (dev-charseq #x2b) 501 (dev-charseq #x2b)
502 (dev-charseq #x3c #xc1) 502 (dev-charseq #x3c #xc1)
503 (dev-charseq #xc3)) 503 (dev-charseq #xc3))
@@ -508,7 +508,7 @@ preferred rule from the sanskrit fonts." )
508 "Devanagari Spacing Glyphs") 508 "Devanagari Spacing Glyphs")
509 509
510(defvar dev-glyph-right-modifier 510(defvar dev-glyph-right-modifier
511 (append 511 (append
512 (dev-charseq #xc9) 512 (dev-charseq #xc9)
513 (dev-charseq #xd2 #xd5)) 513 (dev-charseq #xd2 #xd5))
514 "Devanagari Modifiers attached at the right side.") 514 "Devanagari Modifiers attached at the right side.")
@@ -525,7 +525,7 @@ preferred rule from the sanskrit fonts." )
525 "Devanagari Matras attached at the top side.") 525 "Devanagari Matras attached at the top side.")
526 526
527(defvar dev-glyph-bottom-modifier 527(defvar dev-glyph-bottom-modifier
528 (append 528 (append
529 (dev-charseq #xd6 #xdf) 529 (dev-charseq #xd6 #xdf)
530 (dev-charseq #xc2)) 530 (dev-charseq #xc2))
531 "Devanagari Modifiers attached at the bottom.") 531 "Devanagari Modifiers attached at the bottom.")
@@ -541,9 +541,9 @@ preferred rule from the sanskrit fonts." )
541 (,(dev-charseq #xc5) . 7) 541 (,(dev-charseq #xc5) . 7)
542 (,dev-glyph-bottom-modifier . 8))) 542 (,dev-glyph-bottom-modifier . 8)))
543 543
544(mapc 544(mapc
545 (function (lambda (x) 545 (function (lambda (x)
546 (mapc 546 (mapc
547 (function (lambda (y) 547 (function (lambda (y)
548 (put-char-code-property y 'composition-order (cdr x)))) 548 (put-char-code-property y 'composition-order (cdr x))))
549 (car x)))) 549 (car x))))
@@ -563,84 +563,84 @@ preferred rule from the sanskrit fonts." )
563(defun devanagari-compose-syllable-region (from to) 563(defun devanagari-compose-syllable-region (from to)
564 "Compose devanagari syllable in region FROM to TO." 564 "Compose devanagari syllable in region FROM to TO."
565 (let ((glyph-str nil) (cons-num 0) glyph-str-list 565 (let ((glyph-str nil) (cons-num 0) glyph-str-list
566 (last-halant nil) (preceding-r nil) (last-modifier nil) 566 (last-halant nil) (preceding-r nil) (last-modifier nil)
567 (last-char (char-before to)) match-str 567 (last-char (char-before to)) match-str
568 glyph-block split-pos) 568 glyph-block split-pos)
569 (save-excursion 569 (save-excursion
570 (save-restriction 570 (save-restriction
571 ;;; *** char-to-glyph conversion *** 571 ;;; *** char-to-glyph conversion ***
572 ;; Special rule 1. -- Last halant must be preserved. 572 ;; Special rule 1. -- Last halant must be preserved.
573 (if (eq last-char ?$,16-(B) 573 (if (eq last-char ?$,16-(B)
574 (progn 574 (progn
575 (setq last-halant t) 575 (setq last-halant t)
576 (narrow-to-region from (1- to))) 576 (narrow-to-region from (1- to)))
577 (narrow-to-region from to) 577 (narrow-to-region from to)
578 ;; note if the last char is modifier. 578 ;; note if the last char is modifier.
579 (if (or (eq last-char ?$,15A(B) (eq last-char ?$,15B(B)) 579 (if (or (eq last-char ?$,15A(B) (eq last-char ?$,15B(B))
580 (setq last-modifier t))) 580 (setq last-modifier t)))
581 (goto-char (point-min)) 581 (goto-char (point-min))
582 ;; Special rule 2. -- preceding "r halant" must be modifier. 582 ;; Special rule 2. -- preceding "r halant" must be modifier.
583 (when (looking-at "$,15p6-(B.") 583 (when (looking-at "$,15p6-(B.")
584 (setq preceding-r t) 584 (setq preceding-r t)
585 (goto-char (+ 2 (point)))) 585 (goto-char (+ 2 (point))))
586 ;; translate the rest characters into glyphs 586 ;; translate the rest characters into glyphs
587 (while (re-search-forward dev-char-glyph-regexp nil t) 587 (while (re-search-forward dev-char-glyph-regexp nil t)
588 (setq match-str (match-string 0)) 588 (setq match-str (match-string 0))
589 (setq glyph-str 589 (setq glyph-str
590 (concat glyph-str 590 (concat glyph-str
591 (gethash match-str dev-char-glyph-hash))) 591 (gethash match-str dev-char-glyph-hash)))
592 ;; count the number of consonant-glyhs. 592 ;; count the number of consonant-glyhs.
593 (if (string-match devanagari-consonant match-str) 593 (if (string-match devanagari-consonant match-str)
594 (setq cons-num (1+ cons-num)))) 594 (setq cons-num (1+ cons-num))))
595 ;; preceding-r must be attached before the anuswar if exists. 595 ;; preceding-r must be attached before the anuswar if exists.
596 (if preceding-r 596 (if preceding-r
597 (if last-modifier 597 (if last-modifier
598 (setq glyph-str (concat (substring glyph-str 0 -1) 598 (setq glyph-str (concat (substring glyph-str 0 -1)
599 "$,4"'(B" (substring glyph-str -1))) 599 "$,4"'(B" (substring glyph-str -1)))
600 (setq glyph-str (concat glyph-str "$,4"'(B")))) 600 (setq glyph-str (concat glyph-str "$,4"'(B"))))
601 (if last-halant (setq glyph-str (concat glyph-str "$,4""(B"))) 601 (if last-halant (setq glyph-str (concat glyph-str "$,4""(B")))
602 ;;; *** glyph-to-glyph conversion *** 602 ;;; *** glyph-to-glyph conversion ***
603 (when (string-match dev-glyph-glyph-regexp glyph-str) 603 (when (string-match dev-glyph-glyph-regexp glyph-str)
604 (setq glyph-str 604 (setq glyph-str
605 (replace-match (gethash (match-string 0 glyph-str) 605 (replace-match (gethash (match-string 0 glyph-str)
606 dev-glyph-glyph-hash) 606 dev-glyph-glyph-hash)
607 nil t glyph-str)) 607 nil t glyph-str))
608 (if (and (> cons-num 1) 608 (if (and (> cons-num 1)
609 (string-match dev-glyph-glyph-2-regexp glyph-str)) 609 (string-match dev-glyph-glyph-2-regexp glyph-str))
610 (setq glyph-str 610 (setq glyph-str
611 (replace-match (gethash (match-string 0 glyph-str) 611 (replace-match (gethash (match-string 0 glyph-str)
612 dev-glyph-glyph-2-hash) 612 dev-glyph-glyph-2-hash)
613 nil t glyph-str)))) 613 nil t glyph-str))))
614 ;;; *** glyph reordering *** 614 ;;; *** glyph reordering ***
615 (while (setq split-pos (string-match "$,4""(B\\|.$" glyph-str)) 615 (while (setq split-pos (string-match "$,4""(B\\|.$" glyph-str))
616 (setq glyph-block (substring glyph-str 0 (1+ split-pos))) 616 (setq glyph-block (substring glyph-str 0 (1+ split-pos)))
617 (setq glyph-str (substring glyph-str (1+ split-pos))) 617 (setq glyph-str (substring glyph-str (1+ split-pos)))
618 (setq 618 (setq
619 glyph-block 619 glyph-block
620 (if (string-match dev-glyph-right-modifier-regexp glyph-block) 620 (if (string-match dev-glyph-right-modifier-regexp glyph-block)
621 (sort (string-to-list glyph-block) 621 (sort (string-to-list glyph-block)
622 (function (lambda (x y) 622 (function (lambda (x y)
623 (< (get-char-code-property x 'composition-order) 623 (< (get-char-code-property x 'composition-order)
624 (get-char-code-property y 'composition-order))))) 624 (get-char-code-property y 'composition-order)))))
625 (sort (string-to-list glyph-block) 625 (sort (string-to-list glyph-block)
626 (function (lambda (x y) 626 (function (lambda (x y)
627 (let ((xo (get-char-code-property x 'composition-order)) 627 (let ((xo (get-char-code-property x 'composition-order))
628 (yo (get-char-code-property y 'composition-order))) 628 (yo (get-char-code-property y 'composition-order)))
629 (if (= xo 2) nil (if (= yo 2) t (< xo yo))))))))) 629 (if (= xo 2) nil (if (= yo 2) t (< xo yo)))))))))
630 (setq glyph-str-list (nconc glyph-str-list glyph-block))) 630 (setq glyph-str-list (nconc glyph-str-list glyph-block)))
631 ;; concatenate and attach reference-points. 631 ;; concatenate and attach reference-points.
632 (setq glyph-str 632 (setq glyph-str
633 (cdr 633 (cdr
634 (apply 634 (apply
635 'nconc 635 'nconc
636 (mapcar 636 (mapcar
637 (function (lambda (x) 637 (function (lambda (x)
638 (list 638 (list
639 (or (get-char-code-property x 'reference-point) 639 (or (get-char-code-property x 'reference-point)
640 '(5 . 3) ;; default reference point. 640 '(5 . 3) ;; default reference point.
641 ) 641 )
642 x))) 642 x)))
643 glyph-str-list)))))) 643 glyph-str-list))))))
644 (compose-region from to glyph-str))) 644 (compose-region from to glyph-str)))
645 645
646(provide 'devan-util) 646(provide 'devan-util)