* bug#63361: [PATCH] Improved persian.el transliterations (eg, Hh) + improved bidi insertion
@ 2023-05-07 17:31 Mohsen Banan
2023-05-08 12:29 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Mohsen Banan @ 2023-05-07 17:31 UTC (permalink / raw)
To: 63361
[-- Attachment #1: Type: text/plain, Size: 158 bytes --]
Please apply this patch to lisp/leim/quail/persian.el
It fixes some experienced shortcomings in persian
transliteration input-method.
Thanks,
...Mohsen
[-- Attachment #2: 0001-Improved-transliterations-eg-Hh-improved-bidi-insert.patch --]
[-- Type: text/x-diff, Size: 10877 bytes --]
From ef285406d47e73eb766b43ce25405f0b73c1115b Mon Sep 17 00:00:00 2001
From: Mohsen Banan <form@mohsen.banan.1.byname.net>
Date: Sun, 7 May 2023 10:11:55 -0700
Subject: [PATCH] Improved transliterations (eg, Hh) + improved bidi insertion
support.
---
lisp/leim/quail/persian.el | 124 ++++++++++++++++++++++---------------
1 file changed, 75 insertions(+), 49 deletions(-)
diff --git a/lisp/leim/quail/persian.el b/lisp/leim/quail/persian.el
index 2915f362ee6..77f1a4cd293 100644
--- a/lisp/leim/quail/persian.el
+++ b/lisp/leim/quail/persian.el
@@ -1,8 +1,8 @@
;;; persian.el --- Quail package for inputting Persian/Farsi keyboard -*- coding: utf-8; lexical-binding: t -*-
-;; Copyright (C) 2011-2023 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2022 Free Software Foundation, Inc.
-;; Author: Mohsen BANAN <libre@mohsen.1.banan.byname.net>
+;; Author: Mohsen BANAN <emacs@mohsen.1.banan.byname.net>
;; URL: http://mohsen.1.banan.byname.net/contact
;; Keywords: multilingual, input method, Farsi, Persian, keyboard
@@ -23,7 +23,7 @@
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
-
+;;
;; This file contains a collection of input methods for
;; Persian languages (Farsi, Urdu, Pashto/Afghanic, ...)
;;
@@ -395,6 +395,7 @@
("u" ?و)
("V" ?ؤ)
("h" ?ه)
+ ("Hh" ?ه) ;; to take care of هه -- hHh
("y" ?ی)
("i" ?ی)
("I" ?ئ)
@@ -402,7 +403,7 @@
;;;;;;;;;;; isiri-6219 Table 6 -- جدول ۶ - حروِفِ عربی
("F" ?إ)
- ("D" ?\u0671) ;; (insert-char #x0671)ٱ named: حرفِ الفِ وصل
+ ("D" ?\u0671) ;; (ucs-insert #x0671)ٱ named: حرفِ الفِ وصل
("K" ?ك) ;; Arabic kaf
("Th" ?ة) ;; ta marbuteh
("Y" ?ي)
@@ -421,40 +422,40 @@
("8" ?۸)
("9" ?۹)
- ("\\/" ?\u066B) ;; (insert-char #x066B)٫ named: ممیزِ فارسی
- ("\\," ?\u066C) ;; (insert-char #x066C)٬ named: جداکنندهی هزارهای فارسی
- ("%" ?\u066A) ;; (insert-char #x066A)٪ named: درصدِ فارسی
- ("+" ?\u002B) ;; (insert-char #x002B)+ named: علامتِ بهاضافه
- ("-" ?\u2212) ;; (insert-char #x2212)− named: علامتِ منها
- ("\\*" ?\u00D7) ;; (insert-char #x00D7)× named: علامتِ ضرب
- ("\\-" ?\u00F7) ;; (insert-char #x00F7)÷ named: علامتِ تقسیم
- ("<" ?\u003C) ;; (insert-char #x003C)< named: علامتِ کوچکتر
- ("=" ?\u003D) ;; (insert-char #x003D)= named: علامتِ مساوی
- (">" ?\u003E) ;; (insert-char #x003E)> named: علامتِ بزرگتر
+ ("\\/" ?\u066B) ;; (ucs-insert #x066B)٫ named: ممیزِ فارسی
+ ("\\," ?\u066C) ;; (ucs-insert #x066C)٬ named: جداکنندهی هزارهای فارسی
+ ("%" ?\u066A) ;; (ucs-insert #x066A)٪ named: درصدِ فارسی
+ ("+" ?\u002B) ;; (ucs-insert #x002B)+ named: علامتِ بهاضافه
+ ("-" ?\u2212) ;; (ucs-insert #x2212)− named: علامتِ منها
+ ("\\*" ?\u00D7) ;; (ucs-insert #x00D7)× named: علامتِ ضرب
+ ("\\-" ?\u00F7) ;; (ucs-insert #x00F7)÷ named: علامتِ تقسیم
+ ("<" ?\u003C) ;; (ucs-insert #x003C)< named: علامتِ کوچکتر
+ ("=" ?\u003D) ;; (ucs-insert #x003D)= named: علامتِ مساوی
+ (">" ?\u003E) ;; (ucs-insert #x003E)> named: علامتِ بزرگتر
;;;;;;;;;;; isiri-6219 Table 2 -- جدول ۲ - علائم نقطه گذاریِ مشترک
;;; Space
("." ?.) ;;
- (":" ?\u003A) ;; (insert-char #x003A): named:
- ("!" ?\u0021) ;; (insert-char #x0021)! named:
- ("\\." ?\u2026) ;; (insert-char #x2026)… named:
- ("\\-" ?\u2010) ;; (insert-char #x2010)‐ named:
- ("-" ?\u002D) ;; (insert-char #x002D)- named:
+ (":" ?\u003A) ;; (ucs-insert #x003A): named:
+ ("!" ?\u0021) ;; (ucs-insert #x0021)! named:
+ ("\\." ?\u2026) ;; (ucs-insert #x2026)… named:
+ ("\\-" ?\u2010) ;; (ucs-insert #x2010)‐ named:
+ ("-" ?\u002D) ;; (ucs-insert #x002D)- named:
("|" ?|)
;;("\\\\" ?\)
("//" ?/)
- ("*" ?\u002A) ;; (insert-char #x002A)* named:
- ("(" ?\u0028) ;; (insert-char #x0028)( named:
- (")" ?\u0029) ;; (insert-char #x0029)) named:
- ("[" ?\u005B) ;; (insert-char #x005B)[ named:
- ("[" ?\u005D) ;; (insert-char #x005D)] named:
- ("{" ?\u007B) ;; (insert-char #x007B){ named:
- ("}" ?\u007D) ;; (insert-char #x007D)} named:
- ("\\<" ?\u00AB) ;; (insert-char #x00AB)« named:
- ("\\>" ?\u00BB) ;; (insert-char #x00BB)» named:
- ("N" ?\u00AB) ;; (insert-char #x00AB)« named:
- ("M" ?\u00BB) ;; (insert-char #x00BB)» named:
+ ("*" ?\u002A) ;; (ucs-insert #x002A)* named:
+ ("(" ?\u0028) ;; (ucs-insert #x0028)( named:
+ (")" ?\u0029) ;; (ucs-insert #x0029)) named:
+ ("[" ?\u005B) ;; (ucs-insert #x005B)[ named:
+ ("[" ?\u005D) ;; (ucs-insert #x005D)] named:
+ ("{" ?\u007B) ;; (ucs-insert #x007B){ named:
+ ("}" ?\u007D) ;; (ucs-insert #x007D)} named:
+ ("\\<" ?\u00AB) ;; (ucs-insert #x00AB)« named:
+ ("\\>" ?\u00BB) ;; (ucs-insert #x00BB)» named:
+ ("N" ?\u00AB) ;; (ucs-insert #x00AB)« named:
+ ("M" ?\u00BB) ;; (ucs-insert #x00BB)» named:
;;;;;;;;;;; isiri-6219 Table 3 -- جدول ۳ - علائم نقطه گذاریِ فارسی
("," ?،) ;; farsi
@@ -463,24 +464,49 @@
("_" ?ـ) ;;
-;;;;;;;;;;; isiri-6219 Table 1 -- جدول ۱ - نویسههای کنترلی
+;;;;;;;;;;; isiri-6219 Table 1 (plus bidi updates) - جدول ۱ - نویسههای کنترلی
;; LF
;; CR
- ("‌" ?\u200C) ;; (insert-char #x200C) named: فاصلهی مجازی
+ ("‌" ?\u200C) ;; (ucs-insert #x200C) named: فاصلهی مجازی
("/" ?\u200C) ;;
- ("‍" ?\u200D) ;; (insert-char #x200D) named: اتصالِ مجازی
+ ("‍" ?\u200D) ;; (ucs-insert #x200D) named: اتصالِ مجازی
("J" ?\u200D) ;;
- ("‎" ?\u200E) ;; (insert-char #x200E) named: نشانهی چپبهراست
- ("‏" ?\u200F) ;; (insert-char #x200F) named: نشانهی راستبهچپ
- ("&ls;" ?\u2028) ;; (insert-char #x2028)
named: جداکنندهی سطرها
- ("&ps;" ?\u2028) ;; (insert-char #x2029)
named: جداکنندهی بندها
- ("&lre;" ?\u202A) ;; (insert-char #x202A) named: زیرمتنِ چپبهراست
- ("&rle;" ?\u202B) ;; (insert-char #x202B) named: زیرمتنِ راستبهچپ
- ("&pdf;" ?\u202C) ;; (insert-char #x202C) named: پایانِ زیرمتن
- ("&lro;" ?\u202D) ;; (insert-char #x202D) named: زیرمتنِ اکیداً چپبهراست
- ("&rlo;" ?\u202D) ;; (insert-char #x202E) named: زیرمتنِ اکیداً راستبهچپ
- ("&bom;" ?\uFEFF) ;; (insert-char #xFEFF) named: نشانهی ترتیبِ بایتها
-
+ ("&ls;" ?\u2028) ;; (ucs-insert #x2028)
named: جداکنندهی سطرها
+ ("&ps;" ?\u2029) ;; (ucs-insert #x2029)
named: جداکنندهی بندها
+ ;;
+ ;; Byte Order Mark (Historic)
+ ("&bom;" ?\uFEFF) ;; (ucs-insert #xFEFF) named: نشانهی ترتیبِ بایتها
+ ;; BIDI Controls
+ ;; -------
+ ;; LEFT-TO-RIGHT MARK (strongly typed LTR character)
+ ("‎" ?\u200E) ;; (ucs-insert #x200E) named: نشانهی چپبهراست
+ ("L" ?\u200E)
+ ;; RIGHT-TO-LEFT MARK (strongly typed RTL character)
+ ("‏" ?\u200F) ;; (ucs-insert #x200F) named: نشانهی راستبهچپ
+ ("R" ?\u200F)
+ ;; LEFT-TO-RIGHT ISOLATE (sets base direction to LTR & isolates the embedded)
+ ("&lri;" ?\u2066) ;; (ucs-insert #x2066)
+ ;; RIGHT-TO-LEFT ISOLATE (sets base direction to RTL & isolates the embedded)
+ ("&rli;" ?\u2067) ;; (ucs-insert #x2067)
+ ;; FIRST-STRONG ISOLATE (isolates content & sets dir to first strongly typed)
+ ("&fsi;" ?\u2068) ;; (ucs-insert #x2068)
+ ;; POP DIRECTIONAL ISOLATE (used for RLI, LRI or FSI)
+ ;; EMACS BUG
+ ;; If ("&pdi;" ?\u2069) is included Emacs fully hangs with a (describe-input-method 'farsi-transliterate-banan)
+ ;;("&pdi;" ?\u2069) ;; (ucs-insert #x2069)
+ ;; LEFT-TO-RIGHT EMBEDDING (sets base dir to LTR but allows embedded text)
+ ("&lre;" ?\u202A) ;; (ucs-insert #x202A) named: زیرمتنِ چپبهراست
+ ("B" ?\u202A)
+ ;; RIGHT-TO-LEFT EMBEDDING (sets base dir to RTL but allows embedded text)
+ ("&rle;" ?\u202B) ;; (ucs-insert #x202B) named: زیرمتنِ راستبهچپ
+ ;; POP DIRECTIONAL FORMATTING (used for RLE or LRE and RLO or LRO)
+ ;; EMACS ANOMOLY --- Why does &pdf not show up in (describe-input-method 'farsi-transliterate-banan)
+ ("&pdf;" ?\u202C) ;; (ucs-insert #x202C) named: پایانِ زیرمتن
+ ("P" ?\u202C)
+ ;; LEFT-TO-RIGHT OVERRIDE (overrides the bidirectional algorithm, display LTR)
+ ("&lro;" ?\u202D) ;; (ucs-insert #x202D) named: زیرمتنِ اکیداً چپبهراست
+ ;; RIGHT-TO-LEFT OVERRIDE (overrides the bidirectional algorithm, display RTL)
+ ("&rlo;" ?\u202E) ;; (ucs-insert #x202E) named: زیرمتنِ اکیداً راستبهچپ
;;;;;;;;;;; isiri-6219 Table 7 -- جدول ۷ - نشانههایِ فارسی
("^" ?َ) ;; zbar ;; زبر فارسى
@@ -491,14 +517,14 @@
("O" ?ٌ) ;; دو پيش فارسى -- تنوين رفع
("~" ?ّ) ;; tashdid ;; تشديد فارسى
("@" ?ْ) ;; ساکن فارسى
- ("U" ?\u0653) ;; (insert-char #x0653)ٓ named: مدِ فارسی
+ ("U" ?\u0653) ;; (ucs-insert #x0653)ٓ named: مدِ فارسی
("`" ?ٔ) ;; همزه فارسى بالا
- ("C" ?\u0655) ;; (insert-char #x0655)ٕ named: همزه فارسى پایین
- ("$" ?\u0670) ;; (insert-char #x0670)ٰ named: الفِ مقصورهی فارسی
+ ("C" ?\u0655) ;; (ucs-insert #x0655)ٕ named: همزه فارسى پایین
+ ("$" ?\u0670) ;; (ucs-insert #x0670)ٰ named: الفِ مقصورهی فارسی
;;;;;;;;;;; isiri-6219 Table 8 - Forbidden Characters -- جدول ۸ - نویسههایِ ممنوع
-;; ;; he ye (insert-char 1728) (insert-char #x06c0) kills emacs-24.0.90
+;; ;; he ye (ucs-insert 1728) (ucs-insert #x06c0) kills emacs-24.0.90
;; arabic digits 0-9
@@ -508,7 +534,7 @@
("\\~" ?~)
("\\@" ?@)
("\\#" ?#)
- ("\\$" ?\uFDFC) ;; (insert-char #xFDFC)﷼ named:
+ ("\\$" ?\uFDFC) ;; (ucs-insert #xFDFC)﷼ named:
("\\^" ?^)
("\\1" ?1)
("\\2" ?2)
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#63361: [PATCH] Improved persian.el transliterations (eg, Hh) + improved bidi insertion
2023-05-07 17:31 bug#63361: [PATCH] Improved persian.el transliterations (eg, Hh) + improved bidi insertion Mohsen Banan
@ 2023-05-08 12:29 ` Eli Zaretskii
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2023-05-08 12:29 UTC (permalink / raw)
To: Mohsen Banan; +Cc: 63361-done
> From: Mohsen Banan <emacs@mohsen.1.banan.byname.net>
> Date: Sun, 07 May 2023 10:31:33 -0700
>
> Please apply this patch to lisp/leim/quail/persian.el
>
> It fixes some experienced shortcomings in persian
> transliteration input-method.
Thanks, installed on the emacs-29 branch.
Please in the future try to follow our conventions for commit log
messages more closely. CONTRIBUTE explains how to do that, and you
will find plenty of examples by just running "git log".
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-08 12:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-07 17:31 bug#63361: [PATCH] Improved persian.el transliterations (eg, Hh) + improved bidi insertion Mohsen Banan
2023-05-08 12:29 ` Eli Zaretskii
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).