unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "समीर सिंह Sameer Singh" <lumarzeli30@gmail.com>
To: 55439@debbugs.gnu.org
Subject: bug#55439: [PATCH] Add support for the Modi script
Date: Mon, 16 May 2022 05:03:59 +0530	[thread overview]
Message-ID: <CAOR1sLwyx1Q=pQW82hYyXyX2mCRE0o41PWgrjsWNP8zEv7mgOA@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 269 bytes --]

I have added the modi script to Emacs this time.

I have also renamed Hindi to Devanagari in etc/HELLO, since this script is
also used by
languages other than Hindi, like: Marathi and Nepali. If this change is not
warranted you can
revert it.

Please review the patch.

[-- Attachment #1.2: Type: text/html, Size: 370 bytes --]

[-- Attachment #2: 0001-Add-support-for-the-Modi-script.patch --]
[-- Type: text/x-patch, Size: 7661 bytes --]

From 390e29f3f87d0c69b4e04c36db6b057f55cd86f1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E0=A4=B8=E0=A4=AE=E0=A5=80=E0=A4=B0=20=E0=A4=B8=E0=A4=BF?=
 =?UTF-8?q?=E0=A4=82=E0=A4=B9=20Sameer=20Singh?= <lumarzeli30@gmail.com>
Date: Mon, 16 May 2022 04:56:19 +0530
Subject: [PATCH] Add support for the Modi script

* lisp/language/indian.el ("Modi"): New language environment.
Add composition rules for Modi.  Add sample text and input
method.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Modi.
* lisp/leim/quail/indian.el ("modi"): New input method.

* etc/HELLO: Add a Modi greeting.
Rename Hindi to Devanagari.
* etc/NEWS: Announce the new language environment and its
input method.
---
 etc/HELLO                     |   5 +-
 etc/NEWS                      |   5 ++
 lisp/international/fontset.el |   3 +-
 lisp/language/indian.el       |  32 +++++++++++
 lisp/leim/quail/indian.el     | 101 ++++++++++++++++++++++++++++++++++
 5 files changed, 144 insertions(+), 2 deletions(-)

diff --git a/etc/HELLO b/etc/HELLO
index 16a38b59d3..04014e8dea 100644
--- a/etc/HELLO
+++ b/etc/HELLO
@@ -38,6 +38,7 @@ Comanche /kəˈmæntʃiː/	Haa marʉ́awe
 Cree (ᓀᐦᐃᔭᐍᐏᐣ)	ᑕᓂᓯ / ᐙᒋᔮ
 Czech (čeština)	Dobrý den
 Danish (dansk)	Hej / Goddag / Halløj
+Devanagari (देवनागरी)	नमस्ते / नमस्कार
 Dutch (Nederlands)	Hallo / Dag
 Efik  /ˈɛfɪk/	Mɔkɔm
 Egyptian Hieroglyphs (𓂋𓏤𓈖𓆎𓅓‌𓏏𓊖)	𓅓𓊵𓏏𓊪, 𓇍𓇋𓂻𓍘𓇋
@@ -55,7 +57,6 @@ Greek, ancient (ἑλληνική)	Οὖλέ τε καὶ μέγα χαῖρε
 Gujarati (ગુજરાતી)	નમસ્તે
 Hebrew (עִבְרִית)	שָׁלוֹם
 Hungarian (magyar)	Szép jó napot!
-Hindi (हिंदी)	नमस्ते / नमस्कार ।
 Inuktitut (ᐃᓄᒃᑎᑐᑦ)	ᐊᐃ
 Italian (italiano)	Ciao / Buon giorno
 Javanese (ꦧꦱꦗꦮꦶ)	console.log("ꦲꦭꦺꦴ");
@@ -69,6 +70,7 @@ Malayalam (മലയാളം)	നമസ്കാരം
 Maldivian (ދިވެހި)	އައްސަލާމު ޢަލައިކުމް / ކިހިނެހް؟
 Maltese (il-Malti)	Bonġu / Saħħa
 Mathematics	∀ p ∈ world • hello p  □
+Modi (𑘦𑘻𑘚𑘲)	𑘡𑘦𑘭𑘿𑘎𑘰𑘨
 Mongolian (монгол хэл)	Сайн байна уу?
 Northern Thai (ᨣᩣᩴᨾᩮᩬᩥᨦ / ᨽᩣᩈᩣᩃ᩶ᩣ᩠ᨶᨶᩣ)	ᩈ᩠ᩅᩢᩔ᩠ᨯᩦᨣᩕᩢ᩠ᨸ
 Norwegian (norsk)	Hei / God dag
diff --git a/etc/NEWS b/etc/NEWS
index a3ec2100e9..67f711033a 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -801,6 +801,11 @@ This language environment supports the Syloti Nagri script for the Sylheti
 language, which is spoke in parts of Bangladesh, Assam and Tripura.  A new
 input method, 'syloti-nagri', is provided to type text in this script.
 
+*** New language environment "Modi"
+This language environment supports the Modi script which was used to write
+the Marathi language in the past.  A new input method, 'modi', is provided
+to type text in this script.
+
 ---
 *** New Greek translation of the Emacs tutorial.
 Type 'C-u C-h t' to select it in case your language setup does not do
diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el
index 0abbf2309c..40499f42d0 100644
--- a/lisp/international/fontset.el
+++ b/lisp/international/fontset.el
@@ -244,7 +244,7 @@ font-encoding-charset-alist
 	(newa #x11400)
 	(tirhuta #x11481 #x1148F #x114D0)
 	(siddham #x1158E #x115AF #x115D4)
-	(modi #x11600)
+	(modi #x1160E #x11630 #x11655)
 	(takri #x11680)
 	(dogra #x11800)
 	(warang-citi #x118A1)
@@ -782,6 +782,7 @@ setup-default-fontset
                     sharada
                     tirhuta
                     siddham
+                    modi
 		    makasar
                     dives-akuru
 		    cuneiform
diff --git a/lisp/language/indian.el b/lisp/language/indian.el
index 559239b491..ae1ea14279 100644
--- a/lisp/language/indian.el
+++ b/lisp/language/indian.el
@@ -191,6 +191,16 @@ 'devanagari
 in this language environment."))
  '("Indian"))
 
+(set-language-info-alist
+ "Modi" '((charset unicode)
+          (coding-system utf-8)
+          (coding-priority utf-8)
+          (input-method . "modi")
+          (sample-text . "Modi (𑘦𑘻𑘚𑘲)        𑘡𑘦𑘭𑘿𑘎𑘰𑘨")
+          (documentation . "\
+Marathi language and one of its script Modi is supported
+in this language environment."))
+ '("Indian"))
 
 ;; Replace mnemonic characters in REGEXP according to TABLE.  TABLE is
 ;; an alist of (MNEMONIC-STRING . REPLACEMENT-STRING).
@@ -618,5 +628,27 @@ malayalam-composable-pattern
                                        vowel "?" nasal "?")
                                1 'font-shape-gstring))))
 
+;; Modi composition rules
+(let ((consonant            "[\x1160E-\x1162F]")
+      (independent-vowel    "[\x11600-\x1160D]")
+      (vowel                "[\x11630-\x1163C]")
+      (nasal                "\x1163D")
+      (visarga              "\x1163E")
+      (virama               "\x1163F")
+      (ardhacandra          "\x11640"))
+  (set-char-table-range composition-function-table
+                        '(#x11630 . #x11640)
+                        (list (vector
+                               ;; Consonant based syllables
+                               (concat consonant "\\(?:" virama consonant "\\)*\\(?:"
+                                       virama "\\|" vowel "*" ardhacandra "?" nasal
+                                       "?" visarga "?\\)")
+                               1 'font-shape-gstring)
+                              (vector
+                               ;; Vowels based syllables
+                               (concat independent-vowel virama "?" vowel "?" ardhacandra
+                                       nasal "?" visarga "?")
+                               1 'font-shape-gstring))))
+
 (provide 'indian)
 ;;; indian.el ends here
diff --git a/lisp/leim/quail/indian.el b/lisp/leim/quail/indian.el
index eb9d1183e5..95798a4477 100644
--- a/lisp/leim/quail/indian.el
+++ b/lisp/leim/quail/indian.el
@@ -1348,4 +1348,105 @@ "||"
 ("M"  ?ꠋ)
 )
 
+(quail-define-package
+ "modi" "Modi" "𑘦𑘻" t "Modi phonetic input method.
+
+ `\\=`' is used to switch levels instead of Alt-Gr.
+" nil t t t t nil nil nil nil nil t)
+
+(quail-define-rules
+("``" ?₹)
+("1"  ?𑙑)
+("`1" ?1)
+("2"  ?𑙒)
+("`2" ?2)
+("3"  ?𑙓)
+("`3" ?3)
+("4"  ?𑙔)
+("`4" ?4)
+("5"  ?𑙕)
+("`5" ?5)
+("6"  ?𑙖)
+("`6" ?6)
+("7"  ?𑙗)
+("`7" ?7)
+("8"  ?𑙘)
+("`8" ?8)
+("9"  ?𑙙)
+("`9" ?9)
+("0"  ?𑙐)
+("`0" ?0)
+("`)" ?𑙃)
+("`\\" ?𑙁)
+("`|" ?𑙂)
+("`"  ?𑘘)
+("q"  ?𑘘)
+("Q"  ?𑘙)
+("`q" ?𑙄)
+("w"  ?𑘚)
+("W"  ?𑘛)
+("e"  ?𑘹)
+("E"  ?𑘺)
+("`e" ?𑘊)
+("`E" ?𑘋)
+("r"  ?𑘨)
+("R"  ?𑘵)
+("`r" ?𑘆)
+("t"  ?𑘝)
+("T"  ?𑘞)
+("y"  ?𑘧)
+("u"  ?𑘳)
+("U"  ?𑘴)
+("`u" ?𑘄)
+("`U" ?𑘅)
+("i"  ?𑘱)
+("I"  ?𑘲)
+("`i" ?𑘂)
+("`I" ?𑘃)
+("o"  ?𑘻)
+("O"  ?𑘼)
+("`o" ?𑘌)
+("`O" ?𑘍)
+("p"  ?𑘢)
+("P"  ?𑘣)
+("a"  ?𑘰)
+("A"  ?𑘁)
+("`a" ?𑘀)
+("s"  ?𑘭)
+("S"  ?𑘫)
+("d"  ?𑘟)
+("D"  ?𑘠)
+("f"  ?𑘿)
+("F"  ?𑘶)
+("`f" ?𑘇)
+("g"  ?𑘐)
+("G"  ?𑘑)
+("h"  ?𑘮)
+("H"  ?𑘾)
+("j"  ?𑘕)
+("J"  ?𑘖)
+("k"  ?𑘎)
+("K"  ?𑘏)
+("l"  ?𑘩)
+("L"  ?𑘯)
+("`l" ?𑘷)
+("`L" ?𑘈)
+("z"  ?𑘗)
+("Z"  ?𑘒)
+("`z" ?𑘸)
+("`Z" ?𑘉)
+("x"  ?𑘬)
+("X"  ?𑙀)
+("c"  ?𑘓)
+("C"  ?𑘔)
+("`c" #x200C)  ; ZWNJ
+("v"  ?𑘪)
+("b"  ?𑘤)
+("B"  ?𑘥)
+("n"  ?𑘡)
+("N"  ?𑘜)
+("m"  ?𑘦)
+("M"  ?𑘽)
+)
+
 ;;; indian.el ends here
-- 
2.36.1


             reply	other threads:[~2022-05-15 23:33 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-15 23:33 समीर सिंह Sameer Singh [this message]
2022-05-16  7:00 ` bug#55439: [PATCH] Add support for the Modi script Pankaj Jangid
2022-05-17 22:57   ` Richard Stallman
2022-05-16 11:33 ` Eli Zaretskii
2022-05-16 23:25   ` समीर सिंह Sameer Singh
2022-05-17  9:49     ` Visuwesh
2022-05-17  9:57       ` समीर सिंह Sameer Singh
2022-05-17 12:11         ` Eli Zaretskii
2022-05-17 13:42           ` Visuwesh
2022-05-17 13:48             ` Visuwesh
2022-05-17 16:04               ` Eli Zaretskii
2022-05-17 16:05             ` Eli Zaretskii
2022-05-17 12:10       ` Eli Zaretskii
2022-05-17 14:10         ` Visuwesh
2022-05-17 16:06           ` Eli Zaretskii
2022-05-17 14:14         ` Visuwesh
2022-05-17 22:59       ` Richard Stallman
2022-05-18  0:14         ` समीर सिंह Sameer Singh
2022-05-18  3:08           ` Pankaj Jangid
2022-05-18  3:41             ` समीर सिंह Sameer Singh
2022-05-18  7:12               ` Pankaj Jangid
2022-05-18 12:51                 ` Eli Zaretskii
2022-05-19  3:14                   ` Pankaj Jangid
2022-05-19  7:12                     ` Eli Zaretskii
2022-05-19 13:40                       ` Pankaj Jangid
2022-05-19 13:58                         ` Eli Zaretskii
2022-05-19 14:31                           ` Visuwesh
2022-05-19 15:52                             ` Eli Zaretskii
2022-05-19 16:32                               ` Pankaj Jangid
2022-05-21  8:06                                 ` Eli Zaretskii
2022-05-18 12:47               ` Eli Zaretskii
2022-05-18 12:45           ` Eli Zaretskii
2022-05-18 13:25             ` Visuwesh
2022-05-18 13:33               ` Eli Zaretskii
2022-05-18 14:58                 ` समीर सिंह Sameer Singh
2022-05-18 15:10                   ` Visuwesh
2022-05-18 15:23                     ` समीर सिंह Sameer Singh
2022-05-19 23:13                       ` Richard Stallman
2022-05-18 15:47                   ` Eli Zaretskii
2022-05-18 16:15                     ` समीर सिंह Sameer Singh
2022-05-18  4:33         ` Visuwesh
2022-05-19 23:13           ` Richard Stallman
2022-05-17 13:24     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOR1sLwyx1Q=pQW82hYyXyX2mCRE0o41PWgrjsWNP8zEv7mgOA@mail.gmail.com' \
    --to=lumarzeli30@gmail.com \
    --cc=55439@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).