diff options
| author | Eli Zaretskii | 2020-05-29 16:30:44 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2020-05-29 16:30:44 +0300 |
| commit | c74e24eacd2cfb182e2159a23db21cfbec73cced (patch) | |
| tree | 61173245528df1c8653b207257e2870377d90ecc | |
| parent | 9050f0f1bcb58ea10c7da7d415f06c2c4ae2daed (diff) | |
| download | emacs-c74e24eacd2cfb182e2159a23db21cfbec73cced.tar.gz emacs-c74e24eacd2cfb182e2159a23db21cfbec73cced.zip | |
Commit indian.el forgotten in previous change.
| -rw-r--r-- | lisp/leim/quail/indian.el | 89 |
1 files changed, 80 insertions, 9 deletions
diff --git a/lisp/leim/quail/indian.el b/lisp/leim/quail/indian.el index 2681eab0e5e..100ae63f6ac 100644 --- a/lisp/leim/quail/indian.el +++ b/lisp/leim/quail/indian.el | |||
| @@ -117,6 +117,7 @@ | |||
| 117 | indian-knd-itrans-v5-hash "kannada-itrans" "Kannada" "KndIT" | 117 | indian-knd-itrans-v5-hash "kannada-itrans" "Kannada" "KndIT" |
| 118 | "Kannada transliteration by ITRANS method.") | 118 | "Kannada transliteration by ITRANS method.") |
| 119 | 119 | ||
| 120 | ;; ITRANS not applicable to Malayalam & could be removed eventually | ||
| 120 | (if nil | 121 | (if nil |
| 121 | (quail-define-package "malayalam-itrans" "Malayalam" "MlmIT" t "Malayalam ITRANS")) | 122 | (quail-define-package "malayalam-itrans" "Malayalam" "MlmIT" t "Malayalam ITRANS")) |
| 122 | (quail-define-indian-trans-package | 123 | (quail-define-indian-trans-package |
| @@ -358,24 +359,23 @@ Full key sequences are listed below:") | |||
| 358 | '( | 359 | '( |
| 359 | (;; VOWELS (18) | 360 | (;; VOWELS (18) |
| 360 | (?D nil) (?E ?e) (?F ?f) (?R ?r) (?G ?g) (?T ?t) | 361 | (?D nil) (?E ?e) (?F ?f) (?R ?r) (?G ?g) (?T ?t) |
| 361 | (?+ ?=) ("F]" "f]") (?! ?@) (?S ?s) (?Z ?z) (?W ?w) | 362 | (?= ?+) nil nil (?S ?s) (?Z ?z) (?W ?w) |
| 362 | (?| ?\\) (?~ ?`) (?A ?a) (?Q ?q) ("+]" "=]") ("R]" "r]")) | 363 | nil (?~ ?`) (?A ?a) (?Q ?q)) |
| 363 | (;; CONSONANTS (42) | 364 | (;; CONSONANTS (42) |
| 364 | ?k ?K ?i ?I ?U ;; GRUTTALS | 365 | ?k ?K ?i ?I ?U ;; GRUTTALS |
| 365 | ?\; ?: ?p ?P ?} ;; PALATALS | 366 | ?\; ?: ?p ?P ?} ;; PALATALS |
| 366 | ?' ?\" ?\[ ?{ ?C ;; CEREBRALS | 367 | ?' ?\" ?\[ ?{ ?C ;; CEREBRALS |
| 367 | ?l ?L ?o ?O ?v ?V ;; DENTALS | 368 | ?l ?L ?o ?O ?v nil ;; DENTALS |
| 368 | ?h ?H ?y ?Y ?c ;; LABIALS | 369 | ?h ?H ?y ?Y ?c ;; LABIALS |
| 369 | ?/ ?j ?J ?n ?N "N]" ?b ;; SEMIVOWELS | 370 | ?/ ?j ?J ?n ?N ?B ?b ;; SEMIVOWELS |
| 370 | ?M ?< ?m ?u ;; SIBILANTS | 371 | ?M ?< ?m ?u ;; SIBILANTS |
| 371 | "k]" "K]" "i]" "p]" "[]" "{]" "H]" "/]" ;; NUKTAS | 372 | nil nil nil nil nil nil nil nil nil) ;; NUKTAS |
| 372 | ?% ?&) | ||
| 373 | (;; Misc Symbols (7) | 373 | (;; Misc Symbols (7) |
| 374 | ?X ?x ?_ ">]" ?d "X]" ?>) | 374 | nil ?x ?_ nil ?d) |
| 375 | (;; Digits | 375 | (;; Digits |
| 376 | ?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9) | 376 | ?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9) |
| 377 | (;; Inscripts | 377 | (;; Chillus |
| 378 | ?# ?$ ?^ ?* ?\]))) | 378 | "Cd" "Cd]" "vd" "vd]" "jd" "jd]" "nd" "nd]" "Nd" "Nd]"))) |
| 379 | 379 | ||
| 380 | (defvar inscript-tml-keytable | 380 | (defvar inscript-tml-keytable |
| 381 | '( | 381 | '( |
| @@ -463,6 +463,9 @@ Full key sequences are listed below:") | |||
| 463 | "malayalam-inscript" "Malayalam" "MlmIS" | 463 | "malayalam-inscript" "Malayalam" "MlmIS" |
| 464 | "Malayalam keyboard Inscript.") | 464 | "Malayalam keyboard Inscript.") |
| 465 | 465 | ||
| 466 | (quail-defrule "\\" ?) | ||
| 467 | (quail-defrule "X" ?) | ||
| 468 | |||
| 466 | (if nil | 469 | (if nil |
| 467 | (quail-define-package "tamil-inscript" "Tamil" "TmlIS" t "Tamil keyboard Inscript")) | 470 | (quail-define-package "tamil-inscript" "Tamil" "TmlIS" t "Tamil keyboard Inscript")) |
| 468 | (quail-define-inscript-package | 471 | (quail-define-inscript-package |
| @@ -571,4 +574,72 @@ Full key sequences are listed below:") | |||
| 571 | ("?" ?\?) | 574 | ("?" ?\?) |
| 572 | ("/" ?্)) | 575 | ("/" ?্)) |
| 573 | 576 | ||
| 577 | (defun indian-mlm-mozhi-update-translation (control-flag) | ||
| 578 | (let ((len (length quail-current-key)) chillu | ||
| 579 | (vowels '(?a ?e ?i ?o ?u ?A ?E ?I ?O ?U ?R))) | ||
| 580 | (cond ((numberp control-flag) | ||
| 581 | (progn (if (= control-flag 0) | ||
| 582 | (setq quail-current-str quail-current-key) | ||
| 583 | (cond (input-method-exit-on-first-char) | ||
| 584 | ((and (memq (aref quail-current-key | ||
| 585 | (1- control-flag)) | ||
| 586 | vowels) | ||
| 587 | (setq chillu (cl-position | ||
| 588 | (aref quail-current-key | ||
| 589 | control-flag) | ||
| 590 | '(?m ?N ?n ?r ?l ?L)))) | ||
| 591 | ;; conditions for putting chillu | ||
| 592 | (and (or (and (= control-flag (1- len)) | ||
| 593 | (not (setq control-flag nil))) | ||
| 594 | (and (= control-flag (- len 2)) | ||
| 595 | (let ((temp (aref quail-current-key | ||
| 596 | (1- len)))) | ||
| 597 | ;; is it last char of word? | ||
| 598 | (not | ||
| 599 | (or (and (>= temp ?a) (<= temp ?z)) | ||
| 600 | (and (>= temp ?A) (<= temp ?Z)) | ||
| 601 | (eq temp ?~)))) | ||
| 602 | (setq control-flag (1+ control-flag)))) | ||
| 603 | (setq quail-current-str ;; put chillu | ||
| 604 | (concat (if (not (stringp | ||
| 605 | quail-current-str)) | ||
| 606 | (string quail-current-str) | ||
| 607 | quail-current-str) | ||
| 608 | (string | ||
| 609 | (nth chillu '(?ം ?ൺ ?ൻ ?ർ ?ൽ ?ൾ))))))))) | ||
| 610 | (and (not input-method-exit-on-first-char) control-flag | ||
| 611 | (while (> len control-flag) | ||
| 612 | (setq len (1- len)) | ||
| 613 | (setq unread-command-events | ||
| 614 | (cons (aref quail-current-key len) | ||
| 615 | unread-command-events)))) | ||
| 616 | )) | ||
| 617 | ((null control-flag) | ||
| 618 | (unless quail-current-str | ||
| 619 | (setq quail-current-str quail-current-key) | ||
| 620 | )) | ||
| 621 | ((equal control-flag t) | ||
| 622 | (if (memq (aref quail-current-key (1- len)) ;; If vowel ending, | ||
| 623 | vowels) ;; may have to put | ||
| 624 | (setq control-flag nil))))) ;; chillu. So don't | ||
| 625 | control-flag) ;; end translation | ||
| 626 | |||
| 627 | (quail-define-package "malayalam-mozhi" "Malayalam" "MlmMI" t | ||
| 628 | "Malayalam transliteration by Mozhi method." | ||
| 629 | nil nil t nil nil nil t nil | ||
| 630 | 'indian-mlm-mozhi-update-translation) | ||
| 631 | |||
| 632 | (maphash | ||
| 633 | (lambda (key val) | ||
| 634 | (quail-defrule key (if (= (length val) 1) | ||
| 635 | (string-to-char val) | ||
| 636 | (vector val)))) | ||
| 637 | (cdr indian-mlm-mozhi-hash)) | ||
| 638 | |||
| 639 | (defun indian-mlm-mozhi-underscore (key len) (throw 'quail-tag nil)) | ||
| 640 | |||
| 641 | (quail-defrule "_" 'indian-mlm-mozhi-underscore) | ||
| 642 | (quail-defrule "|" ?) | ||
| 643 | (quail-defrule "||" ?) | ||
| 644 | |||
| 574 | ;;; indian.el ends here | 645 | ;;; indian.el ends here |