From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arun Isaac Newsgroups: gmane.emacs.bugs Subject: bug#58070: [PATCH v3] Add tamil99 input method Date: Tue, 18 Oct 2022 23:30:59 +0530 Message-ID: <20221018180059.22329-1-arunisaac@systemreboot.net> References: <87h701ip1x.fsf@systemreboot.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13708"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 58070@debbugs.gnu.org To: Arun Isaac , Visuwesh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 18 20:02:34 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1okqvA-0003A3-Po for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 Oct 2022 20:02:33 +0200 Original-Received: from localhost ([::1]:58510 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okqv8-0003s9-9f for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 Oct 2022 14:02:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49172) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okqug-0003q9-RW for bug-gnu-emacs@gnu.org; Tue, 18 Oct 2022 14:02:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54989) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okqug-0008Aq-J0 for bug-gnu-emacs@gnu.org; Tue, 18 Oct 2022 14:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1okquf-0008DD-UW for bug-gnu-emacs@gnu.org; Tue, 18 Oct 2022 14:02:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Arun Isaac Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Oct 2022 18:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58070 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 58070-submit@debbugs.gnu.org id=B58070.166611608331513 (code B ref 58070); Tue, 18 Oct 2022 18:02:01 +0000 Original-Received: (at 58070) by debbugs.gnu.org; 18 Oct 2022 18:01:23 +0000 Original-Received: from localhost ([127.0.0.1]:54067 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okqu2-0008CD-PE for submit@debbugs.gnu.org; Tue, 18 Oct 2022 14:01:23 -0400 Original-Received: from mugam.systemreboot.net ([139.59.75.54]:48362) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okqtz-0008C3-65 for 58070@debbugs.gnu.org; Tue, 18 Oct 2022 14:01:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=AutUvIn6jTa+omFbRg3AeoJ2Ji6Sq3bj27zcwxhkg3o=; b=KQ5VPKPXkksp5+lvURkVRI5f4F Z8T9oKhpwDf7cs1NtsOmLg+YAPM5z2qcB5i2CdCvm2ZKK/goFzyDI+KlHoLwvCc+ilp15S0YebPJp sA8jnot1cMy/OcKec6AJRiuj0l9Qf9hZdp9SXxiuJndRnGnc5iafqmaTIhYlwL7cZmlHMzW5+GUrj M9cMc7HkG8ulZo33AltnuduuvX4gaUiNKxKX8THV5/PB/wvfAA8MI9AX4srUSi3H9I/k9bVeZRPjV q9KrlG/sTqz1lNlZ/KL6ZKqzDULePNjLExwMknn6aQRqUyMNp1N5PR/FBe4Ui6DBrz927ibgJTvmz KjBsbTLQ==; Original-Received: from [192.168.2.1] (port=64872 helo=localhost.localdomain) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1okqtr-0003Om-08; Tue, 18 Oct 2022 23:31:11 +0530 X-Mailer: git-send-email 2.37.3 In-Reply-To: <87h701ip1x.fsf@systemreboot.net> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:245816 Archived-At: * lisp/leim/quail/indian.el: Require pcase and seq. ("tamil99"): New input method. * etc/NEWS: Mention new tamil99 input method. --- etc/NEWS | 3 + lisp/leim/quail/indian.el | 161 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 164 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 3d1af8bd6f..bcdc991ea3 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1279,6 +1279,9 @@ The default input method for the Tamil language environment is now change the input method's translation rules, customize the user option 'tamil-translation-rules'. +--- +*** New tamil99 input method for the Tamil language + * Changes in Specialized Modes and Packages in Emacs 29.1 diff --git a/lisp/leim/quail/indian.el b/lisp/leim/quail/indian.el index 431d8369c1..84a3c7cd7e 100644 --- a/lisp/leim/quail/indian.el +++ b/lisp/leim/quail/indian.el @@ -30,6 +30,8 @@ ;;; Code: +(require 'pcase) +(require 'seq) (require 'quail) (require 'ind-util) @@ -699,6 +701,165 @@ is." "tamil-inscript-digits" "Tamil" "TmlISD" "Tamil keyboard Inscript with Tamil digits support.") +;; Tamil99 input method +;; +;; Tamil99 is a keyboard layout and input method that is specifically +;; designed for the Tamil language. Vowels and vowel modifiers are +;; input with your left hand, and consonants are input with your right +;; hand. See https://en.wikipedia.org/wiki/Tamil_99 +;; +;; தமிழ்99 உள்ளீட்டு முறை +;; +;; தமிழ்99 தமிழுக்கென்றே உருவாக்கப்பட்ட விசைப்பலகை அமைப்பும் உள்ளீட்டு முறையும் +;; ஆகும். உயிர்களை இடக்கையுடனும் மெய்களை வலக்கையுடனும் தட்டச்சிடும்படி +;; அமைக்கப்பட்டது. https://ta.wikipedia.org/wiki/%E0%AE%A4%E0%AE%AE%E0%AE%BF%E0%AE%B4%E0%AF%8D_99 +;; காண்க. + +(quail-define-package + "tamil99" "Tamil" "தமிழ்99" + t "Tamil99 input method" + nil t t t t nil nil nil nil nil t) + +(defconst tamil99-vowels + '(("q" "ஆ") + ("w" "ஈ") + ("e" "ஊ") + ("r" "ஐ") + ("t" "ஏ") + ("a" "அ") + ("s" "இ") + ("d" "உ") + ("g" "எ") + ("z" "ஔ") + ("x" "ஓ") + ("c" "ஒ")) + "Mapping for vowels.") + +(defconst tamil99-vowel-modifiers + '(("q" "ா") + ("w" "ீ") + ("e" "ூ") + ("r" "ை") + ("t" "ே") + ("a" "") + ("s" "ி") + ("d" "ு") + ("g" "ெ") + ("z" "ௌ") + ("x" "ோ") + ("c" "ொ") + ("f" "்")) + "Mapping for vowel modifiers.") + +(defconst tamil99-hard-consonants + '(("h" "க") + ("[" "ச") + ("o" "ட") + ("l" "த") + ("j" "ப") + ("u" "ற")) + "Mapping for hard consonants (வல்லினம்).") + +(defconst tamil99-soft-consonants + '(("b" "ங") + ("]" "ஞ") + ("p" "ண") + (";" "ந") + ("k" "ம") + ("i" "ன")) + "Mapping for soft consonants (மெல்லினம்).") + +(defconst tamil99-medium-consonants + '(("'" "ய") + ("m" "ர") + ("n" "ல") + ("v" "வ") + ("/" "ழ") + ("y" "ள")) + "Mapping for medium consonants (இடையினம்).") + +(defconst tamil99-grantham-consonants + '(("Q" "ஸ") + ("W" "ஷ") + ("E" "ஜ") + ("R" "ஹ")) + "Mapping for grantham consonants (கிரந்தம்).") + +(defconst tamil99-consonants + (append tamil99-hard-consonants + tamil99-soft-consonants + tamil99-medium-consonants + tamil99-grantham-consonants) + "Mapping for all consonants.") + +(defconst tamil99-other + `(("T" ,(vector "க்ஷ")) + ("Y" ,(vector "ஶஂரீ")) + ("O" "[") + ("P" "]") + ("A" "௹") + ("S" "௺") + ("D" "௸") + ("F" "ஃ") + ("K" "\"") + ("L" ":") + (":" ";") + ("\"" "'") + ("Z" "௳") + ("X" "௴") + ("C" "௵") + ("V" "௶") + ("B" "௷") + ("M" "/")) + "Mapping for miscellaneous characters.") + +;; உயிர் +;; vowel +(mapc (pcase-lambda (`(,vowel-key ,vowel)) + (quail-defrule vowel-key vowel)) + tamil99-vowels) + +(mapc (pcase-lambda (`(,consonant-key ,consonant)) + ;; அகர உயிர்மெய் + ;; consonant symbol (consonant combined with the first vowel அ) + (quail-defrule consonant-key consonant) + ;; மெய்யொற்று பின் அகர உயிர்மெய் + ;; pulli on double consonant + (quail-defrule (concat consonant-key consonant-key) + (vector (concat consonant "்" consonant))) + (mapc (pcase-lambda (`(,vowel-key ,vowel-modifier)) + ;; உயிர்மெய் + ;; vowelised consonant + (quail-defrule (concat consonant-key vowel-key) + (vector (concat consonant vowel-modifier))) + ;; மெய்யொற்று பின் பிற உயிர்மெய் + ;; vowelised consonant after double consonant + (quail-defrule (concat consonant-key consonant-key vowel-key) + (vector (concat consonant "்" consonant vowel-modifier)))) + tamil99-vowel-modifiers)) + tamil99-consonants) + +(seq-mapn (pcase-lambda (`(,soft-consonant-key ,soft-consonant) + `(,hard-consonant-key ,hard-consonant)) + ;; மெல்லினம் பின் வல்லினம் + ;; hard consonant after soft consonant + (quail-defrule (concat soft-consonant-key hard-consonant-key) + (vector (concat soft-consonant "்" hard-consonant))) + (mapc (pcase-lambda (`(,vowel-key ,vowel-modifier)) + ;; மெல்லின ஒற்றொட்டிய வல்லினம் பின் உயிர்மெய் + ;; vowelised consonant after soft-hard consonant pair + (quail-defrule (concat soft-consonant-key hard-consonant-key vowel-key) + (vector (concat soft-consonant "்" hard-consonant vowel-modifier)))) + tamil99-vowel-modifiers)) + tamil99-soft-consonants + tamil99-hard-consonants) + +;; பிற வரியுருக்கள் +;; other characters +(mapc (pcase-lambda (`(,key ,translation)) + (quail-defrule key translation)) + tamil99-other) + ;; Probhat Input Method (quail-define-package "bengali-probhat" "Bengali" "BngPB" t -- 2.37.3