1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-23 10:34:07 +00:00

* leim/quail/persian.el: Add some mappings.

(farsi-isiri-9147, farsi-transliterate-banan): Doc fixes.

Fixes: debbugs:11812
This commit is contained in:
Mohsen BANAN 2012-08-06 00:34:35 -07:00 committed by Glenn Morris
parent d5be7bd03b
commit 89e5ffea45
2 changed files with 67 additions and 48 deletions

View File

@ -1,3 +1,8 @@
2012-08-06 Mohsen BANAN <libre@mohsen.1.banan.byname.net>
* quail/persian.el: Add some mappings. (Bug#11812)
(farsi-isiri-9147, farsi-transliterate-banan): Doc fixes.
2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
Update .PHONY listings in makefiles.

View File

@ -1,9 +1,9 @@
;;; persian.el --- Quail package for inputting Persian/Farsi keyboard -*- coding: utf-8;-*-
;; Copyright (C) 2011-2012 Free Software Foundation, Inc.
;; Copyright (C) 2011-2012 Free Software Foundation, Inc.
;; Author: Mohsen BANAN <libre@mohsen.1.banan.byname.net>
;; http://mohsen.1.banan.byname.net/contact
;; Author: Mohsen BANAN <libre@mohsen.1.banan.byname.net>
;; X-URL: http://mohsen.1.banan.byname.net/contact
;; Keywords: multilingual, input method, Farsi, Persian, keyboard
@ -31,7 +31,7 @@
;;
;; At this time, the following input methods are specified:
;;
;; - (farsi-isiri-9149) Persian Keyboard based on Islamic Republic of Iran's ISIR-9147
;; - (farsi-isiri-9149) Persian Keyboard based on Islamic Republic of Iran's ISIRI-9147
;; - (farsi-transliterate-banan) An intuitive transliteration keyboard for Farsi
;;
;; Additional documentation for these input methods can be found at:
@ -50,18 +50,26 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; The keyboard mapping defined here is based on:
;; فنّاوریِ اطلاعات - چیدمان حروف و علائم فارسی بر صفحه کلید رایانه
;; استاندارد ملی ایران ۹۱۴۷ چاپ اول
;;
;; Institute of Standards and Industrial Research of Iran
;; Information Technology Layout of Persian Letters and Symbols
;; on Computer Keyboards
;; ISIRI 9147 -- 1st edition
;; http://www.isiri.org/UserStd/DownloadStd.aspx?id=9147
;; Published at: http://www.isiri.org/portal/files/std/9147.pdf
;; Re-Published at: http://www.persoarabic.org/Repub/fpf-isiri-9147
;;
;; The specification is also republished at
;; http://www.farsiweb.ir/wiki/Image:Isiri-9147.pdf
;; and various other sites.
;;
;; ISIRI-6219 is also relevant.
;; Specification of Iran's Persian Character Set is also relevant:
;; فنّاوریِ اطلاعات -- تبادل و شیوه‌ی نمایش اطلاعاتِ فارسی بر اساس یونی کُد
;; استاندارد ملی ایران ۶۲۱۹ نسخهی نهایی
;;
;; Institute of Standards and Industrial Research of Iran
;; Information Technology Persian Information Interchange and Display Mechanism, using Unicode
;; ISIRI-6219 Final Version
;; Published at: http://www.isiri.org/portal/files/std/6219.htm
;; Re-Published at: http://www.persoarabic.org/Repub/fpf-isiri-6219
;;
;; Layers 1, 2 and 3 of ISIRI-9147 are fully implemented with the
;; exception of the Backslash, Alt-Backslash, Shift-Space and
@ -92,10 +100,10 @@
(quail-define-package
"farsi-isiri-9147" "Farsi" " ف" nil "Farsi input method.
Based on ISIRI-9147 Layout of Persian Letters and Symbols on Computer Keyboards.
" nil t t t t nil nil nil nil nil t)
"farsi-isiri-9147" "Persian" " ف" nil
"Farsi keyboard based on ISIRI-9147.
See http://www.persoarabic.org/PLPC/120036 for additional documentation."
nil t t t t nil nil nil nil nil t)
;; Note: the rows of keys below are enclosed in Left-To-Right Override
;; embedding, to prevent them from being reordered by the Emacs
@ -305,11 +313,11 @@ Based on ISIRI-9147 Layout of Persian Letters and Symbols on Computer Keyboards.
;;
;; For some persian characters there are multiple ways of inputting
;; the same character. For example both ``i'' and ``y'' produce ی.
;; For یک ``yk'', ``y'' is more natural and for این ``ain'', ``i'' is more natural.
;; For یک ``yk'', ``y'' is more natural and for این ``ain'', ``i'' is more natural.
;;
;; The more frequently used keys are mapped to lower case. The less frequently used letter moves to
;; upper case. For example: ``s'' is س and ``S'' is ص. ``h'' is ح and ``H''
;; is ه.
;; upper case. For example: ``s'' is س and ``S'' is ص. ``h'' is ه and ``H''
;; is ح.
;;
;; Multi-character input is based on \, &, and / prefix
;; characters. The letter 'h' is used as a postfix for the following two character mappings:
@ -317,29 +325,30 @@ Based on ISIRI-9147 Layout of Persian Letters and Symbols on Computer Keyboards.
;;
;;
;; Prefix letter \ is used for two character inputs when an alternate form of a letter
;; is desired for example \% is: ‌÷ when % is: ٪.
;; is desired for example '\-' is: '÷' when '-' is: '-'.
;;
;; Prefix letter & is used for multi-character inputs when special characters are
;; desired based on their abbreviate name. For example you can enter &lrm; to enter the
;; ``LEFT-TO-RIGHT MARK'' character.
;;
;; Prefix letter / is used to provide two characters. / is: ``ZERO WIDTH NON-JOINER''
;; Prefix letter / is used to provide two characters. / is: ``ZERO WIDTH NON-JOINER''
;; and // is /.
;;
;; The letter 'h' is used in a number of two character postfix mappings,
;; for example ``sh'' ش. So if you need the sequence of ``s'' and ``h'' you
;; need to repeat the ``s''. For example: سحر = 's' 's' 'h' 'r'.
;; need to repeat the ``s''. For example: سهم = 's' 's' 'h' 'm'.
;;
(quail-define-package
"farsi-transliterate-banan" "Farsi" "ب" t
"farsi-transliterate-banan" "Persian" "ب" t
"Intuitive transliteration keyboard layout for persian/farsi.
" nil t t t t nil nil nil nil nil t)
See http://www.persoarabic.org/PLPC/120036 for additional documentation."
nil t t t t nil nil nil nil nil t)
(quail-define-rules
;;;;;;;;;;; isiri-6219 Table 5 -- جدول ۵ - حروِفِ اصلیِ فارسی
;;;;;;;;;;; isiri-6219 Table 5 -- جدول ۵ - حروِفِ اصلیِ فارسی
("W" ) ;; hamzeh
("A" ) ;; U+0622 & ARABIC LETTER ALEF WITH MADDA ABOVE & الف با کلاه
("a" ?ا) ;; U+0627 & ARABIC LETTER ALEF & الف
@ -352,7 +361,8 @@ Based on ISIRI-9147 Layout of Persian Letters and Symbols on Computer Keyboards.
("cc" )
("j" )
("ch" )
("h" )
("H" )
("hh" )
("kh" )
("d" )
("Z" )
@ -370,6 +380,9 @@ Based on ISIRI-9147 Layout of Persian Letters and Symbols on Computer Keyboards.
("X" )
("w" )
("q" )
("G" )
("Gh" )
("GG" )
("f" )
("Q" )
("gh" )
@ -383,13 +396,13 @@ Based on ISIRI-9147 Layout of Persian Letters and Symbols on Computer Keyboards.
("v" )
("u" )
("V" )
("H" ?ه)
("h" ?ه)
("y" )
("i" )
("I" )
;;;;;;;;;;; isiri-6219 Table 6 -- جدول ۶ - حروِفِ عربی
;;;;;;;;;;; isiri-6219 Table 6 -- جدول ۶ - حروِفِ عربی
("F" )
("D" ?\u0671) ;; (ucs-insert #x0671)ٱ named: حرفِ الفِ وصل
("K" ) ;; Arabic kaf
@ -416,8 +429,8 @@ Based on ISIRI-9147 Layout of Persian Letters and Symbols on Computer Keyboards.
("+" ?\u002B) ;; (ucs-insert #x002B)+ named: علامتِ به‌اضافه
("-" ?\u2212) ;; (ucs-insert #x2212) named: علامتِ منها
("\\*" ?\u00D7) ;; (ucs-insert #x00D7)× named: علامتِ ضرب
("\\%" ?\u007F) ;; (ucs-insert #x00F7)÷ named: علامتِ تقسیم
("<" ?\u003C) ;; (ucs-insert #x003C)< named: علامتِ کوچکتر
("\\-" ?\u00F7) ;; (ucs-insert #x00F7)÷ named: علامتِ تقسیم
("<" ?\u003C) ;; (ucs-insert #x003C)< named: علامتِ کوچکتر
("=" ?\u003D) ;; (ucs-insert #x003D)= named: علامتِ مساوی
(">" ?\u003E) ;; (ucs-insert #x003E)> named: علامتِ بزرگتر
@ -425,24 +438,25 @@ Based on ISIRI-9147 Layout of Persian Letters and Symbols on Computer Keyboards.
;;;;;;;;;;; isiri-6219 Table 2 -- جدول ۲ - علائم نقطه گذاریِ مشترک
;;; Space
("." ?.) ;;
(":" ?\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:
(":" ?\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) ;; (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:
("*" ?\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
@ -455,9 +469,9 @@ Based on ISIRI-9147 Layout of Persian Letters and Symbols on Computer Keyboards.
;; LF
;; CR
("&zwnj;" ?\u200C) ;; (ucs-insert #x200C) named: فاصله‌ی مجازی
("/" ?\u200C) ;;
("/" ?\u200C) ;;
("&zwj;" ?\u200D) ;; (ucs-insert #x200D) named: اتصالِ مجازی
("J" ?\u200D) ;;
("J" ?\u200D) ;;
("&lrm;" ?\u200E) ;; (ucs-insert #x200E) named: نشانه‌ی چپ‌به‌راست
("&rlm;" ?\u200F) ;; (ucs-insert #x200F) named: نشانه‌ی راست‌به‌چپ
("&ls;" ?\u2028) ;; (ucs-insert #x2028) named: جداکننده‌ی سطرها
@ -468,7 +482,7 @@ Based on ISIRI-9147 Layout of Persian Letters and Symbols on Computer Keyboards.
("&lro;" ?\u202D) ;; (ucs-insert #x202D) named: زیرمتنِ اکیداً چپ‌به‌راست
("&rlo;" ?\u202D) ;; (ucs-insert #x202E) named: زیرمتنِ اکیداً راست‌به‌چپ
("&bom;" ?\uFEFF) ;; (ucs-insert #xFEFF) named: نشانه‌ی ترتیبِ بایت‌ها
;;;;;;;;;;; isiri-6219 Table 7 -- جدول ۷ - نشانه‌هایِ فارسی
("^" ) ;; zbar ;; زبر فارسى
@ -481,12 +495,12 @@ Based on ISIRI-9147 Layout of Persian Letters and Symbols on Computer Keyboards.
("@" ) ;; ساکن فارسى
("U" ?\u0653) ;; (ucs-insert #x0653)ٓ named: مدِ فارسی
("`" ) ;; همزه فارسى بالا
("C" ?\u0655) ;; (ucs-insert #x0655)ٕ named: همزه فارسى پایین
("C" ?\u0655) ;; (ucs-insert #x0655)ٕ named: همزه فارسى پایین
("$" ?\u0670) ;; (ucs-insert #x0670)ٰ named: الفِ مقصوره‌ی فارسی
;;;;;;;;;;; isiri-6219 Table 8 - Forbidden Characters -- جدول ۸ - نویسه‌هایِ ممنوع
;; ;; he ye (ucs-insert 1728) kills emacs-24.0.90
;; ;; he ye (ucs-insert 1728) (ucs-insert #x06c0) kills emacs-24.0.90
;; arabic digits 0-9
@ -496,7 +510,7 @@ Based on ISIRI-9147 Layout of Persian Letters and Symbols on Computer Keyboards.
("\\~" ?~)
("\\@" ?@)
("\\#" ?#)
("\\$" ?\uFDFC) ;; (ucs-insert #xFDFC)﷼ named:
("\\$" ?\uFDFC) ;; (ucs-insert #xFDFC)﷼ named:
("\\^" ?^)
("\\1" ?1)
("\\2" ?2)