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