comparison lisp/leim/quail/devanagari.el @ 155:43dd3413c7c7 r20-3b4

Import from CVS: tag r20-3b4
author cvs
date Mon, 13 Aug 2007 09:39:39 +0200
parents
children acd284d43ca1
comparison
equal deleted inserted replaced
154:94141801dd7e 155:43dd3413c7c7
1 ;; quail/devanagari.el -- Quail packages for inputting Devanagari
2
3 ;; Copyright (C) 1996 Free Software Foundation, Inc.
4
5 ;; Author: KAWABATA, Taichi <kawabata@is.s.u-tokyo.ac.jp>
6
7 ;; Keywords: multilingual, input method, Indian, Devanagari
8
9 ;; This file is part of GNU Emacs.
10
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your option)
14 ;; any later version.
15
16 ;; GNU Emacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details.
20
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING. If not, write to
23 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24
25 ;;; Commentary:
26
27 ;; History:
28 ;; 1996.10.10 written by KAWABATA, Taichi <kawabata@is.s.u-tokyo.ac.jp>
29 ;; 1997.03.21 fixed by KAWABATA, Taichi
30
31 ;; I'm not sure if this keyboard layout is REALLY an ISCII keyboard layout.
32 ;; Please let me know if it is not.
33
34 ;;; Code:
35
36 (require 'quail)
37 (require 'language/devan-util)
38
39 ;; This function does nothing for now. For future use.
40 (defun quail-devanagari-update-translation (control-flag)
41 (cond ((eq control-flag t) ; terminate translation with the whole key.
42 (insert quail-current-str)
43 (quail-terminate-translation))
44 ((null control-flag) ; proceed translation with more keys.
45 (insert (or quail-current-str quail-current-key)))
46 (t ; control-flag is the number of keys to be translated.
47 (insert (aref quail-current-key 0))
48 (setq unread-command-events
49 (list (aref quail-current-key control-flag))))))
50
51 (defun quail-devanagari-compose-characters ()
52 (interactive)
53 (if (quail-point-in-conversion-region)
54 (let* ((from (overlay-start quail-conv-overlay))
55 (to (overlay-end quail-conv-overlay))
56 (dstr (buffer-substring from to)))
57 (delete-overlay quail-overlay)
58 (delete-overlay quail-conv-overlay)
59 (save-restriction
60 (narrow-to-region from to)
61 (goto-char (point-min))
62 (delete-region (point-min) (point-max))
63 (insert (devanagari-compose-string dstr 'sanskrit))
64 (goto-char (point-max)))
65 (move-overlay quail-conv-overlay from (point))
66 (setq unread-command-events (list last-command-event))
67 (throw 'exit nil))
68 (setq unread-command-events (list last-command-event))
69 (throw 'exit nil)))
70
71 (quail-define-package "quail-devanagari-keyboard-a" "Devanagari" "DevK" t
72 "ISCII Format of Inputting Devanagari.
73 `$(5!\(B !$(5!.(B @$(5!c(B #x $x %x ^x &$(5")(B *$(5"((B ( ) _$(5!#(B +$(5!*(B
74 ~$(5!/(B 1$(5!r(B 2$(5!s(B 3$(5!t(B 4$(5!u(B 5$(5!v(B 6$(5!w(B 7$(5!x(B 8$(5!y(B 9$(5!z(B 0$(5!q(B - =$(5!_(B
75
76 Q$(5!f(B W$(5!-(B E$(5!%(B R$(5!'(B T$(5!)(B Y$(5!K(B U$(5!7(B I$(5!E(B O$(5!C(B P$(5!;(B {$(5!@(B }$(5!<(B |$(5!2(B
77 q$(5!f(B w$(5!b(B e$(5!Z(B r$(5!\(B t$(5!^(B y$(5!J(B u$(5!X(B i$(5!5(B o$(5!D(B p$(5!:(B [$(5!?(B ]$(5!i(B \\$(5!g(B
78
79 A$(5!0(B S$(5!,(B D$(5!$(B F$(5!&(B G$(5!((B H$(5!I(B J$(5!P(B K$(5!4(B l$(5!C(B :$(5!8(B \"$(5!>(B
80 a$(5!e(B s$(5!a(B d$(5!h(B f$(5![(B g$(5!](B h$(5!H(B j$(5!O(B k$(5!3(B l$(5!B(B ;$(5!9(B '$(5!=(B
81
82 Z$(5!+(B X$(5!!(B C$(5!A(B V$(5!G(B B$(5!S(B N$(5!R(B M$(5!U(B <$(5!V(B >$(5!j(B ?$(5!N(B
83 z$(5!`(B x$(5!"(B c$(5!L(B v$(5!F(B b$(5!T(B n$(5!Q(B m$(5!W(B , . /$(5!M(B
84 "
85 nil t t nil nil nil nil nil
86 ;;'quail-devanagari-update-translation
87 nil
88 '((" " . quail-devanagari-compose-characters)
89 ("-" . quail-devanagari-compose-characters)
90 ("," . quail-devanagari-compose-characters)
91 ("\C-m" . quail-devanagari-compose-characters)
92 ([return] . quail-devanagari-compose-characters))
93 )
94
95 ;; ..... (not prepared yet)
96 ;; I forgot where I got this keymap from.
97 ;; Please let me know if you know what this keymap is.
98
99 (quail-define-rules
100 ("`" ?$(5!\(B)
101 ("~" ?$(5!/(B)
102 ("1" ?$(5!r(B)
103 ("!" ?$(5!.(B)
104 ("2" ?$(5!s(B)
105 ("@" ?$(5!c(B)
106 ("3" ?$(5!t(B)
107 ("#" ?# ) ; following "r" in keymap...
108 ("4" ?$(5!u(B)
109 ("$" ?$ ) ; preceding "r" in keymap...
110 ("5" ?$(5!v(B)
111 ("%" ?x ) ; ??
112 ("6" ?$(5!w(B)
113 ("^" ?x ) ; %tra
114 ("7" ?$(5!x(B)
115 ("&" ?$(5")(B) ; % special
116 ("8" ?$(5!y(B)
117 ("*" ?$(5"((B) ; % special
118 ("9" ?$(5!z(B)
119 ("(" ?\()
120 ("0" ?$(5!q(B)
121 (")" ?\))
122 ("-" ?-)
123 ("_" ?$(5!#(B)
124 ("=" ?$(5!_(B)
125 ("+" ?$(5!*(B)
126 ("q" ?$(5!f(B)
127 ("Q" ?$(5!1(B)
128 ("w" ?$(5!b(B)
129 ("W" ?$(5!-(B)
130 ("e" ?$(5!Z(B)
131 ("E" ?$(5!%(B)
132 ("r" ?$(5!\(B)
133 ("R" ?$(5!'(B)
134 ("t" ?$(5!^(B)
135 ("T" ?$(5!)(B)
136 ("y" ?$(5!J(B)
137 ("Y" ?$(5!K(B)
138 ("u" ?$(5!X(B)
139 ("U" ?$(5!7(B)
140 ("i" ?$(5!5(B)
141 ("I" ?$(5!E(B)
142 ("o" ?$(5!D(B)
143 ("O" ?$(5!C(B)
144 ("p" ?$(5!:(B)
145 ("P" ?$(5!;(B)
146 ("[" ?$(5!?(B)
147 ("{" ?$(5!@(B)
148 ("]" ?$(5!i(B)
149 ("}" ?$(5!<(B)
150 ("\\" ?$(5!g(B)
151 ("|" ?$(5!2(B)
152 ("a" ?$(5!e(B)
153 ("A" ?$(5!0(B)
154 ("s" ?$(5!a(B)
155 ("S" ?$(5!,(B)
156 ("d" ?$(5!h(B)
157 ("D" ?$(5!$(B)
158 ("f" ?$(5![(B)
159 ("F" ?$(5!&(B)
160 ("g" ?$(5!](B)
161 ("G" ?$(5!((B)
162 ("h" ?$(5!H(B)
163 ("H" ?$(5!I(B)
164 ("j" ?$(5!O(B)
165 ("J" ?$(5!P(B)
166 ("k" ?$(5!3(B)
167 ("K" ?$(5!4(B)
168 ("l" ?$(5!B(B)
169 ("L" ?$(5!C(B)
170 (";" ?$(5!8(B)
171 (":" ?$(5!9(B)
172 ("'" ?$(5!=(B)
173 ("\"" ?$(5!>(B)
174 ("z" ?$(5!`(B)
175 ("Z" ?$(5!+(B)
176 ("x" ?$(5!"(B)
177 ("X" ?$(5!!(B)
178 ("c" ?$(5!L(B)
179 ("C" ?$(5!A(B)
180 ("v" ?$(5!F(B)
181 ("V" ?$(5!G(B)
182 ("b" ?$(5!T(B)
183 ("B" ?$(5!S(B)
184 ("n" ?$(5!Q(B)
185 ("N" ?$(5!R(B)
186 ("m" ?$(5!W(B)
187 ("M" ?$(5!U(B)
188 ;; ("," ?,)
189 ("<" ?$(5!V(B)
190 ;; ("." ?.)
191 (">" ?$(5!j(B)
192 ("/" ?$(5!M(B)
193 ("?" ?$(5!N(B)
194 )
195
196
197 ;;
198 ;; Quail Devanagari Input By Transliteration
199 ;;
200
201 (eval-when-compile
202
203 (defvar devanagari-consonant-transliteration-alist
204 '(
205 ; GUTTURALS
206 ("k" . "$(5!3(B")
207 ("k." . "$(5!3!i(B")
208 ("kh" . "$(5!4(B")
209 ("kh." . "$(5!4!i(B")
210 ("g" . "$(5!5(B")
211 ("g." . "$(5!5!i(B")
212 ("gh" . "$(5!6(B")
213 ("G" . "$(5!7(B")
214 ; PALATALS
215 ("c" . "$(5!8(B")
216 ("ch" . "$(5!9(B")
217 ("j" . "$(5!:(B")
218 ("j." . "$(5!:!i(B")
219 ("Z" . "$(5!:!i(B")
220 ("jh" . "$(5!;(B")
221 ("J" . "$(5!<(B")
222 ; CEREBRALS
223 ("T" . "$(5!=(B")
224 ("Th" . "$(5!>(B")
225 ("D" . "$(5!?(B")
226 ("D." . "$(5!?!i(B")
227 ("Dh" . "$(5!@(B")
228 ("Dh." . "$(5!@!i(B")
229 ("N" . "$(5!A(B")
230 ; DENTALS
231 ("t" . "$(5!B(B")
232 ("th" . "$(5!C(B")
233 ("d" . "$(5!D(B")
234 ("dh" . "$(5!E(B")
235 ("n" . "$(5!F(B")
236 ("N." . "$(5!G(B")
237 ; LABIALS
238 ("p" . "$(5!H(B")
239 ("ph" . "$(5!I(B")
240 ("ph." . "$(5!I!i(B")
241 ("f" . "$(5!I(B")
242 ("f." . "$(5!I!i(B")
243 ("b" . "$(5!J(B")
244 ("bh" . "$(5!K(B")
245 ("m" . "$(5!L(B")
246 ; SEMIVOWELS
247 ("y" . "$(5!M(B")
248 ("y." . "$(5!N(B")
249 ("Y" . "$(5!N(B")
250 ("r" . "$(5!O(B")
251 ("r." . "$(5!P(B")
252 ("l" . "$(5!Q(B")
253 ("W" . "$(5!R(B")
254 ("W." . "$(5!S(B")
255 ("v" . "$(5!T(B")
256 ("w" . "$(5!T(B")
257 ; SIBILANTS
258 ("z" . "$(5!U(B")
259 ("S" . "$(5!V(B")
260 ("s" . "$(5!W(B")
261 ("h" . "$(5!X(B")
262 ))
263
264 (defvar devanagari-vowel-transliteration-alist
265 '(
266 ;; Special treatment unique to IS 13194 Transliteration
267 ("" . "$(5!h(B")
268 ("a" . "")
269 ; Matra (Vowel Sign)
270 ("A" . "$(5!Z(B")
271 ("i" . "$(5![(B")
272 ("I" . "$(5!\(B")
273 ("u" . "$(5!](B")
274 ("U" . "$(5!^(B")
275 ("R" . "$(5!_(B")
276 ;; ("RR" . "x") ; not specified in ordinary IS 13194.(but in Unicode??)
277 ("q" . "$(5#K(B") ; "$(5#K(B" = "$(5!_!i(B" in IS 13194.
278 ("L" . "$(5#L(B") ; "$(5#L(B" = "$(5![!i(B" in IS 13194.
279 ("E" . "$(5#M(B") ; "$(5#M(B" = "$(5!\!i(B" in IS 13194.
280 ("E" . "$(5!`(B") ; only for transcription of other scripts.
281 ("e" . "$(5!a(B")
282 ("ai" . "$(5!b(B")
283 ("ae" . "$(5!b(B") ; variation of transliteration.
284 ("EE" . "$(5!c(B") ; only for transcription of other scripts. (Candra E)
285 ("O" . "$(5!d(B") ; only for transcription of other scripts.
286 ("o" . "$(5!e(B")
287 ("au" . "$(5!f(B")
288 ("ao" . "$(5!f(B") ; variation of transliteration.
289 ("OO" . "$(5!g(B") ; only for transcription of other scripts. (Candra O)
290 ))
291
292 ;;
293 ;; Independent vowels and other signs.
294 ;;
295
296 (defvar devanagari-other-letters-alist
297 '(
298 ("a" . "$(5!$(B")
299 ("A" . "$(5!%(B")
300 ("i" . "$(5!&(B")
301 ("I" . "$(5!'(B")
302 ("u" . "$(5!((B")
303 ("U" . "$(5!)(B")
304 ("R" . "$(5!*(B")
305 ;; ("RR" . "x") ; not specified in IS 13194. (but in Unicode??)
306 ("q" . "$(5#*(B") ; "$(5#*(B" = "$(5!*!i(B" in IS 13194.
307 ("L" . "$(5#&(B") ; "$(5#&(B" = "$(5!&!i(B" in IS 13194.
308 ("E" . "$(5#'(B") ; "$(5#'(B" = "$(5!'!i(B" in IS 13194.
309 ("Ex" . "$(5!+(B") ; only for transcription of other scripts.
310 ("e" . "$(5!,(B")
311 ("ai" . "$(5!-(B")
312 ("EE" . "$(5!.(B") ; only for transcription of other scripts. (Candra E)
313 ("O" . "$(5!/(B") ; only for transcription of other scripts.
314 ("o" . "$(5!0(B")
315 ("au" . "$(5!1(B")
316 ("ao" . "$(5!1(B") ; variation of transliteration.
317 ("OO" . "$(5!2(B") ; only for transcription of other scripts. (Candra O)
318 ("'" . "$(5#J(B") ; avagraha
319 ("@" . "$(5#!(B") ; OM
320 ("/" . "$(5!j(B")
321 ("M" . "$(5!"(B")
322 ("&" . "$(5!!(B")
323 ("H" . "$(5!#(B")
324 ("." . "$(5!i(B") ; Nukta
325 ("0" . "$(5!q(B")
326 ("1" . "$(5!r(B")
327 ("2" . "$(5!s(B")
328 ("3" . "$(5!t(B")
329 ("4" . "$(5!u(B")
330 ("5" . "$(5!v(B")
331 ("6" . "$(5!w(B")
332 ("7" . "$(5!x(B")
333 ("8" . "$(5!y(B")
334 ("9" . "$(5!z(B")
335 ))
336 )
337
338 (defmacro devanagari-transliteration-quail-define-rules ()
339 (cons 'quail-define-rules
340 (let ((cl devanagari-consonant-transliteration-alist)
341 (ml devanagari-other-letters-alist) rules)
342 (while cl
343 (let ((vl devanagari-vowel-transliteration-alist))
344 (while vl
345 (setq rules
346 (cons (list (concat (car (car cl)) (car (car vl)))
347 (make-vector 1
348 (concat (cdr (car cl)) (cdr (car vl)))))
349 rules))
350 (setq vl (cdr vl))))
351 (setq cl (cdr cl)))
352 (while ml
353 (setq rules (cons (list (car (car ml))
354 (make-vector 1 (cdr (car ml))))
355 rules))
356 (setq ml (cdr ml)))
357 rules)))
358
359 (quail-define-package "quail-devanagari-transliteration" "Devanagari" "DEVt" t
360 "Devanagari inputting method by transliteration
361 VOWELS : a $(5!$(B A $(5!%(B i $(5!&(B I $(5!'(B u $(5!((B U $(5!)(B
362 R $(5!*(B q $(5#*(B L $(5#&(B E $(5#'(B Ex $(5!+(B e $(5!,(B
363 ai $(5!-(B EE $(5!.(B O $(5!/(B o $(5!0(B au $(5!1(B OO $(5!2(B
364 GRUTTALS : k $(5!3(B kh $(5!4(B g $(5!5(B gh $(5!6(B G $(5!7(B
365 PALATALS : c $(5!8(B ch $(5!9(B j $(5!:(B jh $(5!;(B J $(5!<(B (Z $(5!:!i(B)
366 CEREBRALS : T $(5!=(B Th $(5!>(B D $(5!?(B Dh $(5!@(B N $(5!A(B
367 DENTALS : t $(5!B(B th $(5!C(B d $(5!D(B dh $(5!E(B n $(5!F(B (Nq $(5!G(B)
368 LABIALS : p $(5!H(B ph $(5!I(B b $(5!J(B bh $(5!K(B m $(5!L(B (f $(5!I(B)
369 SEMIVOWELS : y $(5!M(B Y $(5!N(B r $(5!O(B Rq $(5!P(B
370 l $(5!Q(B W $(5!R(B W. $(5!S(B v $(5!T(B w $(5!T(B
371 SIBILANTS : z $(5!U(B S $(5!V(B s $(5!W(B h $(5!X(B
372
373 Specials : Anuswar M $(5!"(B Visarg H $(5!#(B
374 Chandrabindu & $(5!!(B Nukta . $(5!i(B
375 Danda / $(5!j(B Avagrah ' $(5#J(B
376 OM @ $(5#!(B
377 "
378 nil t t nil nil nil nil nil
379 ;; 'quail-devanagari-update-translation
380 nil
381 '((" " . quail-devanagari-compose-characters)
382 ("-" . quail-devanagari-compose-characters)
383 ("," . quail-devanagari-compose-characters)
384 ("\C-m" . quail-devanagari-compose-characters)
385 ([return] . quail-devanagari-compose-characters))
386 )
387
388 (devanagari-transliteration-quail-define-rules)
389
390 ;;
391 ;; ITRANS - Indian Script Translation
392 ;;
393
394 (eval-and-compile
395
396 (defun rule-indian-to-devanagari (alist)
397 (if (null alist) nil
398 (cons (cons (car (car alist))
399 (indian-to-devanagari-string (cdr (car alist))))
400 (rule-indian-to-devanagari (cdr alist)))))
401 )
402
403 (eval-when-compile
404
405 (defvar devanagari-consonant-itrans-alist
406 (rule-indian-to-devanagari indian-itrans-consonant-alist))
407
408 (defvar devanagari-vowel-itrans-alist
409 (rule-indian-to-devanagari indian-itrans-vowel-sign-alist))
410
411 (defvar devanagari-other-letters-itrans-alist
412 (rule-indian-to-devanagari indian-itrans-other-letters-alist))
413
414 )
415
416 (defmacro devanagari-itrans-quail-define-rules ()
417 (cons 'quail-define-rules
418 (let ((cl devanagari-consonant-itrans-alist)
419 (ml devanagari-other-letters-itrans-alist) rules)
420 (while cl
421 (let ((vl devanagari-vowel-itrans-alist))
422 (while vl
423 (setq rules
424 (cons (list (concat (car (car cl)) (car (car vl)))
425 (make-vector 1
426 (concat (cdr (car cl)) (cdr (car vl)))))
427 rules))
428 (setq vl (cdr vl))))
429 (setq cl (cdr cl)))
430 (while ml
431 (setq rules (cons (list (car (car ml))
432 (make-vector 1 (cdr (car ml))))
433 rules))
434 (setq ml (cdr ml)))
435 rules)))
436
437 (quail-define-package "quail-devanagari-itrans" "Devanagari" "DEVi" t
438 "Devanagari inputting method by ITRANS
439 Special Keys : Anuswar n'
440 Chandrabindu nn'
441 Visarg nh
442 Nukta type capital letter for first character.
443 $(5!7(B(ng) $(5!<(B(ny) $(5!A(B(nn) $(5!F(B(n) $(5!G(B(nnn)
444 "
445 nil t t nil nil nil nil nil
446 ;; 'quail-devanagari-update-translation
447 nil
448 '((" " . quail-devanagari-compose-characters)
449 ("-" . quail-devanagari-compose-characters)
450 ("," . quail-devanagari-compose-characters)
451 ("\C-m" . quail-devanagari-compose-characters)
452 ([return] . quail-devanagari-compose-characters))
453 )
454
455 (devanagari-itrans-quail-define-rules)
456
457
458 ;;
459 ;; Quail Hindi Input By Transliteration
460 ;;
461
462 (defun quail-devanagari-hindi-compose-characters ()
463 (interactive)
464 (if (quail-point-in-conversion-region)
465 (let* ((from (overlay-start quail-conv-overlay))
466 (to (overlay-end quail-conv-overlay))
467 (dstr (buffer-substring from to)))
468 (delete-overlay quail-overlay)
469 (delete-overlay quail-conv-overlay)
470 (save-restriction
471 (narrow-to-region from to)
472 (goto-char (point-min))
473 (delete-region (point-min) (point-max))
474 (insert (devanagari-compose-string dstr))
475 (goto-char (point-max)))
476 (move-overlay quail-conv-overlay from (point))
477 (setq unread-command-events (list last-command-event))
478 (throw 'exit nil))
479 (setq unread-command-events (list last-command-event))
480 (throw 'exit nil)))
481
482 (eval-when-compile
483
484 (defvar devanagari-hindi-consonant-transliteration-alist
485 '(
486 ; GUTTURALS
487 ("k" . "$(5!3(B")
488 ("ks" . "$(5$.(B")
489 ("k." . "$(5!3!i(B")
490 ("kh" . "$(5!4(B")
491 ("kh." . "$(5!4!i(B")
492 ("g" . "$(5!5(B")
493 ("g." . "$(5!5!i(B")
494 ("gh" . "$(5!6(B")
495 ("G" . "$(5!7(B")
496 ; PALATALS
497 ("ch" . "$(5!8(B")
498 ("chh" . "$(5!9(B")
499 ("j" . "$(5!:(B")
500 ("j." . "$(5!:!i(B")
501 ("z" . "$(5!:!i(B")
502 ("jh" . "$(5!;(B")
503 ("J" . "$(5!<(B")
504 ; CEREBRALS
505 ("T" . "$(5!=(B")
506 ("Th" . "$(5!>(B")
507 ("D" . "$(5!?(B")
508 ("D." . "$(5!?!i(B")
509 ("Dh" . "$(5!@(B")
510 ("Dh." . "$(5!@!i(B")
511 ("N" . "$(5!A(B")
512 ; DENTALS
513 ("t" . "$(5!B(B")
514 ("th" . "$(5!C(B")
515 ("d" . "$(5!D(B")
516 ("dh" . "$(5!E(B")
517 ("n" . "$(5!F(B")
518 ("N." . "$(5!G(B")
519 ; LABIALS
520 ("p" . "$(5!H(B")
521 ("ph" . "$(5!I(B")
522 ("ph." . "$(5!I!i(B")
523 ("f" . "$(5!I(B")
524 ("f." . "$(5!I!i(B")
525 ("b" . "$(5!J(B")
526 ("bh" . "$(5!K(B")
527 ("m" . "$(5!L(B")
528 ; SEMIVOWELS
529 ("y" . "$(5!M(B")
530 ("y." . "$(5!N(B")
531 ("Y" . "$(5!N(B")
532 ("r" . "$(5!O(B")
533 ("r." . "$(5!P(B")
534 ("l" . "$(5!Q(B")
535 ("W" . "$(5!R(B")
536 ("W." . "$(5!S(B")
537 ("v" . "$(5!T(B")
538 ("w" . "$(5!T(B")
539 ; SIBILANTS
540 ("sh" . "$(5!U(B")
541 ("S" . "$(5!V(B")
542 ("s" . "$(5!W(B")
543 ("h" . "$(5!X(B")
544 ; Special for Hindi
545 ("ks" . "$(5$.(B")
546 ("tr" . "$(5"%(B")
547 ("xn" . "$(5$E(B")
548 ))
549
550 (defvar devanagari-hindi-vowel-transliteration-alist
551 '(
552 ; In hindi, halant sign is rarely used so should explicity typed in.
553 ("" . "")
554 ("~" . "$(5!h(B")
555 ; Matra (Vowel Sign)
556 ("a" . "$(5!Z(B")
557 ("i" . "$(5![(B")
558 ("I" . "$(5!\(B")
559 ("u" . "$(5!](B")
560 ("U" . "$(5!^(B")
561 ("R" . "$(5!_(B")
562 ;; ("RR" . "x") ; not specified in ordinary IS 13194.(but in Unicode??)
563 ("q" . "$(5#K(B") ; "$(5#K(B" = "$(5!_!i(B" in IS 13194.
564 ("L" . "$(5#L(B") ; "$(5#L(B" = "$(5![!i(B" in IS 13194.
565 ("E" . "$(5#M(B") ; "$(5#M(B" = "$(5!\!i(B" in IS 13194.
566 ("E" . "$(5!`(B") ; only for transcription of other scripts.
567 ("e" . "$(5!a(B")
568 ("ai" . "$(5!b(B")
569 ("ae" . "$(5!b(B") ; variation of transliteration.
570 ("EE" . "$(5!c(B") ; only for transcription of other scripts. (Candra E)
571 ("O" . "$(5!d(B") ; only for transcription of other scripts.
572 ("o" . "$(5!e(B")
573 ("au" . "$(5!f(B")
574 ("ao" . "$(5!f(B") ; variation of transliteration.
575 ("OO" . "$(5!g(B") ; only for transcription of other scripts. (Candra O)
576 ))
577
578 ;;
579 ;; Independent vowels and other signs.
580 ;;
581
582 (defvar devanagari-hindi-other-letters-alist
583 '(
584 ("a" . "$(5!$(B")
585 ("A" . "$(5!%(B")
586 ("i" . "$(5!&(B")
587 ("I" . "$(5!'(B")
588 ("u" . "$(5!((B")
589 ("U" . "$(5!)(B")
590 ("R" . "$(5!*(B")
591 ;; ("RR" . "x") ; not specified in IS 13194. (but in Unicode??)
592 ("q" . "$(5#*(B") ; "$(5#*(B" = "$(5!*!i(B" in IS 13194.
593 ("L" . "$(5#&(B") ; "$(5#&(B" = "$(5!&!i(B" in IS 13194.
594 ("E" . "$(5#'(B") ; "$(5#'(B" = "$(5!'!i(B" in IS 13194.
595 ("Ex" . "$(5!+(B") ; only for transcription of other scripts.
596 ("e" . "$(5!,(B")
597 ("ai" . "$(5!-(B")
598 ("EE" . "$(5!.(B") ; only for transcription of other scripts. (Candra E)
599 ("O" . "$(5!/(B") ; only for transcription of other scripts.
600 ("o" . "$(5!0(B")
601 ("au" . "$(5!1(B")
602 ("ao" . "$(5!1(B") ; variation of transliteration.
603 ("OO" . "$(5!2(B") ; only for transcription of other scripts. (Candra O)
604 ("'" . "$(5#J(B") ; avagraha
605 ("@" . "$(5#!(B") ; OM
606 ("/" . "$(5!j(B")
607 ("M" . "$(5!"(B")
608 ("&" . "$(5!!(B")
609 ("H" . "$(5!#(B")
610 ("." . "$(5!i(B") ; Nukta
611 ("0" . "$(5!q(B")
612 ("1" . "$(5!r(B")
613 ("2" . "$(5!s(B")
614 ("3" . "$(5!t(B")
615 ("4" . "$(5!u(B")
616 ("5" . "$(5!v(B")
617 ("6" . "$(5!w(B")
618 ("7" . "$(5!x(B")
619 ("8" . "$(5!y(B")
620 ("9" . "$(5!z(B")
621 ))
622 )
623
624 (defmacro devanagari-hindi-transliteration-quail-define-rules ()
625 (cons 'quail-define-rules
626 (let ((cl devanagari-hindi-consonant-transliteration-alist)
627 (ml devanagari-hindi-other-letters-alist) rules)
628 (while cl
629 (let ((vl devanagari-hindi-vowel-transliteration-alist))
630 (while vl
631 (setq rules
632 (cons (list (concat (car (car cl)) (car (car vl)))
633 (make-vector 1
634 (concat (cdr (car cl)) (cdr (car vl)))))
635 rules))
636 (setq vl (cdr vl))))
637 (setq cl (cdr cl)))
638 (while ml
639 (setq rules (cons (list (car (car ml))
640 (make-vector 1 (cdr (car ml))))
641 rules))
642 (setq ml (cdr ml)))
643 rules)))
644
645 (quail-define-package "quail-devanagari-hindi-transliteration" "Hindi" "HINt" t
646 "Devanagari-Hindi inputting method by transliteration
647 VOWELS : a $(5!$(B A $(5!%(B i $(5!&(B I $(5!'(B u $(5!((B U $(5!)(B
648 R $(5!*(B q $(5#*(B L $(5#&(B E $(5#'(B Ex $(5!+(B e $(5!,(B
649 ai $(5!-(B EE $(5!.(B O $(5!/(B o $(5!0(B au $(5!1(B OO $(5!2(B
650 GRUTTALS : k $(5!3(B kh $(5!4(B g $(5!5(B gh $(5!6(B G $(5!7(B
651 PALATALS : c $(5!8(B ch $(5!9(B j $(5!:(B jh $(5!;(B J $(5!<(B z $(5!:!i(B
652 CEREBRALS : T $(5!=(B Th $(5!>(B D $(5!?(B Dh $(5!@(B N $(5!A(B
653 DENTALS : t $(5!B(B th $(5!C(B d $(5!D(B dh $(5!E(B n $(5!F(B (Nq $(5!G(B)
654 LABIALS : p $(5!H(B ph $(5!I(B b $(5!J(B bh $(5!K(B m $(5!L(B (f $(5!I(B)
655 SEMIVOWELS : y $(5!M(B Y $(5!N(B r $(5!O(B Rq $(5!P(B
656 l $(5!Q(B W $(5!R(B W. $(5!S(B v $(5!T(B w $(5!T(B
657 SIBILANTS : sh $(5!U(B S $(5!V(B s $(5!W(B h $(5!X(B
658 OTHERS : ks $(5$.(B tr $(5"%(B xn $(5$E(B
659
660 Specials : Anuswar M $(5!"(B Visarg H $(5!#(B
661 Chandrabindu & $(5!!(B Nukta . $(5!i(B
662 Danda / $(5!j(B Avagrah ' $(5#J(B
663 OM @ $(5#!(B Halant ~ $(5!h(B
664 "
665 nil t t nil nil nil nil nil
666 ;; 'quail-devanagari-update-translation
667 nil
668 '((" " . quail-devanagari-hindi-compose-characters)
669 ("-" . quail-devanagari-hindi-compose-characters)
670 ("," . quail-devanagari-hindi-compose-characters)
671 ("\C-m" . quail-devanagari-hindi-compose-characters)
672 ([return] . quail-devanagari-hindi-compose-characters))
673 )
674
675 (devanagari-hindi-transliteration-quail-define-rules)