Persian/Farsi Transliteration Input Method for emacs24 -- quail-persian-translit.el

Mohsen BANAN <[email protected]> Tue, 26 Apr 2011 00:56:20 -0700
Newsgroups gmane.emacs.devel,gmane.emacs.bidi
Organization ByStar Federation of Autonomous Libre Services -- http://www.by-star.net
Message-ID <[email protected]>
Attached below is a quail file that I have
developed and have been using for a while.

It is a transliteration input method for
Persian/Farsi.

I'd like for it to become part of emacs24.

Would you kindly please include it in emacs?

Thanks.

...Mohsen

;;; quail-persian-translit.el --- Quail package for inputting Persian/Farsi=
 transliteration	-*- coding: utf-8;-*-

;; Author: Mohsen BANAN  <[email protected]>
;; Keywords: input method, Farsi, Persian, transliteration

;;
;; This is a Halaal Poly-Existential intended to remain perpetually Halaal.=
=20
;;
;; Copyleft Mohsen BANAN -- Subject to GPLv3.
;;=20
;; The author wishes for this file to become part of emacs24=20
;; and is happy to transfer copyright to FSF as needed.
;;

;;; Commentary:
;;;  This is a persian/farsi transliteration keyboard designed=20
;;;  for people who:
;;;   - Know how to write in farsi
;;;   - Are comfortable with the qwerty keyboard=20
;;;   - Are familiar with two letter phoentic mapping to persian characters
;;;     (e.g.: gh, kh, ch, sh, zh)
;;;=20=20
;;;  This translit keyboard is designed to be intuitive such that=20
;;;  mapping are easy and natural to remember for a persian writer.
;;;  For some persian characters there are multiple ways of inputing
;;;  the same character.
;;;

;;; Code:

(require 'quail)

(quail-define-package
 "farsi-translit" "Farsi" "=D9=BE" t
 "Intuitively transliterated keyboard layout for persian/farsi.
" nil t t t t nil nil nil nil nil t)

(quail-define-rules
 ("a"  ?=D8=A7)
 ("A"  ?=D8=A2)  ;; alef madde=20=20
 ("#"  ?=D9=8B)  ;; ("ah" ? =D9=8B)   ;; =D8=A7=D9=8B tanvin nasb=20=20=09
 ("b"  ?=D8=A8)
 ("p"  ?=D9=BE)
 ("t"  ?=D8=AA)
 ("c"  ?=D8=AB)
 ("j"  ?=D8=AC)
 ("ch" ?=DA=86)
 ("hh" ?=D8=AD)
 ("kh" ?=D8=AE)
 ("d"  ?=D8=AF)
 ("Z"  ?=D8=B0)
 ("r"  ?=D8=B1)
 ("z"  ?=D8=B2)
 ("zh" ?=DA=98)
 ("s"  ?=D8=B3)
 ("sh" ?=D8=B4)
 ("S"  ?=D8=B5)
 ("x"  ?=D8=B6)
 ("T"  ?=D8=B7)
 ("X"  ?=D8=B8)
 ("w"  ?=D8=B9)
 ("Q"  ?=D8=BA)
 ("f"  ?=D9=81)
 ("q"  ?=D9=82)
 ("gh" ?=D9=82)
 ("k"  ?=DA=A9)
 ("K"  ?=D9=83)  ;;  Arabic kaf
 ("g"  ?=DA=AF)
 ("l"  ?=D9=84)
  ("lh" ?=EF=BB=BB)
 ("m"  ?=D9=85)
 ("n"  ?=D9=86)
 ("v"  ?=D9=88)
 ("u"  ?=D9=88)
 ("H"  ?=D9=87)
 ("h"  ?=D9=87)
 ("th" ?=D8=A9)  ;; ta marbuteh
 ("yh" ?=DB=80)  ;; he ye
 ("y"  ?=D9=89)
 ("i"  ?=D9=8A)

 ("1"  ?=DB=B1)
 ("2"  ?=DB=B2)
 ("3"  ?=DB=B3)
 ("4"  ?=DB=B4)
 ("5"  ?=DB=B5)
 ("6"  ?=DB=B6)
 ("7"  ?=DB=B7)
 ("8"  ?=DB=B8)
 ("9"  ?=DB=B9)
 ("0"  ?=DB=B0)

 ("~"  ?=D9=91)  ;; tashdid
 ("e"  ?=D9=90)  ;; zir=20=20=20
 ("E"  ?=D9=8D)  ;; eizan
 ("^"  ?=D9=8E)  ;; zbar
 ("o"  ?=D9=8F)  ;; peesh
 ("?"  ?=D8=9F)  ;; alamat soal=20
 ("$"  ?=D8=A1)  ;; hamzeh
 ("%"  ?=C3=B7)  ;;
 ("*"  ?=C3=97)  ;;
 (";"  ?=D8=9B)  ;;
 (",h" ?=D8=8C)  ;; farsi=20
 (",h" ?,)  ;; latin
 ("."  ?.)  ;;
 ("_"  ?=D9=80)  ;;=20
)

(provide 'quail-persian-translit)

;;; quail-persian-translit.el ends here