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] Add tamil99 input method Date: Sun, 25 Sep 2022 15:32:44 +0530 Message-ID: <20220925100244.13482-1-arunisaac@systemreboot.net> References: <20220925100020.13229-1-arunisaac@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="31609"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Arun Isaac To: 58070@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 25 12:04:15 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 1ocOUh-0007zP-AO for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Sep 2022 12:04:15 +0200 Original-Received: from localhost ([::1]:34442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ocOUg-00055S-8W for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Sep 2022 06:04:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40334) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocOTa-0004ce-Fh for bug-gnu-emacs@gnu.org; Sun, 25 Sep 2022 06:03:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46821) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ocOTX-0001ux-2k for bug-gnu-emacs@gnu.org; Sun, 25 Sep 2022 06:03:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ocOTW-0005rb-Tu for bug-gnu-emacs@gnu.org; Sun, 25 Sep 2022 06:03:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <20220925100020.13229-1-arunisaac@systemreboot.net> Resent-From: Arun Isaac Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Sep 2022 10:03:02 +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.166410017622519 (code B ref 58070); Sun, 25 Sep 2022 10:03:02 +0000 Original-Received: (at 58070) by debbugs.gnu.org; 25 Sep 2022 10:02:56 +0000 Original-Received: from localhost ([127.0.0.1]:45898 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ocOTP-0005r9-Nm for submit@debbugs.gnu.org; Sun, 25 Sep 2022 06:02:56 -0400 Original-Received: from mugam.systemreboot.net ([139.59.75.54]:50470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ocOTN-0005qz-Iz for 58070@debbugs.gnu.org; Sun, 25 Sep 2022 06:02:55 -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: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:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ru0dGKfYaEGzBRMdV7hYInQRy0gUxsaop/whXdDluJk=; b=CaulPcXop1qL+qfW6ndb7D5W1e MqlILh1E8Pn/Y5f4MxtrwcFuP8YXcn8oqagAKgPgyXcokbREdYpacJgrGa3CC0oNk5yIl/+w1dTrp VVNxQ+oAjSBcnTdSEPbCFdjHIuy4ADb4KiR9baa+KsbfMGxC5Z98fSOeXlQrAFVqXB0SSyuV6ZWVU OVQJX+QXwXJclKUL/FDQnXRMqtpXLOpZw3qTOm8c+sIrIMaSr4KjjSb1llyQslBzApJRIhlXO5m85 HyW1ws2MqM3noqwDjiyOGNM4IcFkpap+ttEQrlMqXAMoSQygzb8qVILQ9VWhZR2iZBuC7r76JN0vw ZHdR87ag==; Original-Received: from [192.168.2.1] (port=31118 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 1ocOTK-000VOD-2Y; Sun, 25 Sep 2022 15:32:50 +0530 X-Mailer: git-send-email 2.37.2 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:243584 Archived-At: * lisp/leim/quail/tamil99.el: New file. * etc/NEWS: Mention new tamil99 input method. --- etc/NEWS | 3 + lisp/leim/quail/tamil99.el | 200 +++++++++++++++++++++++++++++++++++++ 2 files changed, 203 insertions(+) create mode 100644 lisp/leim/quail/tamil99.el 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/tamil99.el b/lisp/leim/quail/tamil99.el new file mode 100644 index 0000000000..780ef968ee --- /dev/null +++ b/lisp/leim/quail/tamil99.el @@ -0,0 +1,200 @@ +;;; tamil99.el --- Quail package for the tamil99 input method -*- lexical-binding: t -*- + +;; Copyright (C) 2022 Free Software Foundation, Inc. +;; +;; Author: Arun Isaac +;; Keywords: multilingual, input method, Indian, Tamil + +;; This file is part of GNU Emacs. +;; +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: +;; +;; 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 தமிழுக்கென்றே உருவாக்கப்பட்ட விசைப்பலகை அமைப்பும் உள்ளீட்டு முறையும் +;; ஆகும். உயிர்களை இடக்கையுடனும் மெய்களை வலக்கையுடனும் தட்டச்சிடும்படி +;; அமைக்கப்பட்டது. https://ta.wikipedia.org/wiki/%E0%AE%A4%E0%AE%AE%E0%AE%BF%E0%AE%B4%E0%AF%8D_99 +;; காண்க. +;; +;; Usage: +;; +;; Switch to the tamil99 input method using M-x set-input-method +;; tamil99 RET and enjoy typing in Tamil! +;; +;; பயன்பாடு: +;; +;; tamil99 உள்ளீட்டு முறைக்கு மாற M-x set-input-method tamil99 RET கட்டளையை +;; இயக்கித் தமிழில் தட்டச்சிட்டு மகிழ்க! + +;;; Code: + +(require 'pcase) +(require 'quail) +(require 'seq) + +(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-vallinam-consonants + '(("h" "க") + ("[" "ச") + ("o" "ட") + ("l" "த") + ("j" "ப") + ("u" "ற")) + "Mapping for vallinam consonants.") + +(defconst tamil99-mellinam-consonants + '(("b" "ங") + ("]" "ஞ") + ("p" "ண") + (";" "ந") + ("k" "ம") + ("i" "ன")) + "Mapping for mellinam consonants.") + +(defconst tamil99-idaiinam-consonants + '(("'" "ய") + ("m" "ர") + ("n" "ல") + ("v" "வ") + ("/" "ழ") + ("y" "ள")) + "Mapping for idaiinam consonants.") + +(defconst tamil99-grantham-consonants + '(("Q" "ஸ") + ("W" "ஷ") + ("E" "ஜ") + ("R" "ஹ")) + "Mapping for grantham consonants.") + +(defconst tamil99-consonants + (append tamil99-vallinam-consonants + tamil99-mellinam-consonants + tamil99-idaiinam-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.") + +(defun tamil99-install () + "Install tamil99 input method." + (quail-define-rules) + ;; உயிர் + ;; vowel + (mapc (pcase-lambda (`(,vowel-key ,vowel)) + (quail-defrule vowel-key vowel)) + tamil99-vowels) + (mapc (pcase-lambda (`(,consonant-key ,consonant)) + ;; அகர உயிர்மெய் + ;; consonant with agaram (அ) + (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)) + ;; உயிர்மெய் + ;; vowel+consonant + (quail-defrule (concat consonant-key vowel-key) + (vector (concat consonant vowel-modifier))) + ;; மெய்யொற்று பின் உயிர்மெய் + ;; vowel+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 (`(,mellinam-consonant-key ,mellinam-consonant) + `(,vallinam-consonant-key ,vallinam-consonant)) + ;; மெல்லினம் பின் வல்லினம் + ;; vallinam after mellinam + (quail-defrule (concat mellinam-consonant-key vallinam-consonant-key) + (vector (concat mellinam-consonant "்" vallinam-consonant))) + (mapc (pcase-lambda (`(,vowel-key ,vowel-modifier)) + ;; மெல்லின ஒற்றொட்டிய வல்லினம் பின் உயிர்மெய் + ;; vowel+consonant after mellinam-vallinam consonant + (quail-defrule (concat mellinam-consonant-key vallinam-consonant-key vowel-key) + (vector (concat mellinam-consonant "்" vallinam-consonant vowel-modifier)))) + tamil99-vowel-modifiers)) + tamil99-mellinam-consonants + tamil99-vallinam-consonants) + ;; பிற வரியுருக்கள் + ;; other characters + (mapc (pcase-lambda (`(,key ,translation)) + (quail-defrule key translation)) + tamil99-other)) + +(tamil99-install) + +(provide 'tamil99) + +;;; tamil99.el ends here -- 2.37.2