1 ;;; persian.el --- support for Persian -*- coding: utf-8;-*-
3 ;; Copyright (C) 2012 Free Software Foundation, Inc.
5 ;; Author: Mohsen BANAN <libre@mohsen.1.banan.byname.net>
6 ;; X-URL: http://mohsen.1.banan.byname.net/contact
8 ;; Keywords: multilingual, Farsi, Persian
10 ;; This file is part of GNU Emacs.
12 ;; GNU Emacs is free software: you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation, either version 3 of the License, or
15 ;; (at your option) any later version.
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
27 ;; For Persian, the character set ISO8859-6 is supported. (Same as Arabic)
31 (define-coding-system 'iso-8859-6
32 "ISO-8859-6 based encoding (MIME:ISO-8859-6)."
35 :charset-list '(iso-8859-6)
36 :mime-charset 'iso-8859-6)
38 (define-coding-system 'windows-1256
39 "windows-1256 (Arabic) encoding (MIME: WINDOWS-1256)"
42 :charset-list '(windows-1256)
43 :mime-charset 'windows-1256)
45 (define-coding-system-alias 'cp1256 'windows-1256)
47 (set-language-info-alist
48 "Persian" '((charset unicode)
49 (coding-system utf-8 iso-8859-6 windows-1256)
50 (coding-priority utf-8 iso-8859-6 windows-1256)
51 (input-method . "farsi-transliterate-banan")
52 (sample-text . "Persian فارسی")
53 (documentation . "Bidirectional editing is supported.")))
56 composition-function-table
58 (list ["[\u0600-\u06FF]+" 0 font-shape-gstring]))
62 ;;; persian.el ends here