Merge from emacs-24; up to 2012-12-06T01:39:03Z!monnier@iro.umontreal.ca
[bpt/emacs.git] / lisp / language / misc-lang.el
index ac69cf5..ee06e34 100644 (file)
@@ -1,7 +1,7 @@
-;;; misc-lang.el --- support for miscellaneous languages (characters) -*- no-byte-compile: t -*-
+;;; misc-lang.el --- support for miscellaneous languages (characters)
 
 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009, 2010
+;;   2005, 2006, 2007, 2008, 2009, 2010, 2011
 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
 ;;   Registration Number H14PRO021
 
@@ -40,8 +40,9 @@
 IPA is International Phonetic Alphabet for English, French, German
 and Italian.")))
 
-;; This is for Arabic.  But, as we still don't have Arabic language
-;; support, we at least define a coding system here.
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Arabic
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (define-coding-system 'iso-8859-6
   "ISO-8859-6 based encoding (MIME:ISO-8859-6)."
@@ -50,7 +51,35 @@ and Italian.")))
   :charset-list '(iso-8859-6)
   :mime-charset 'iso-8859-6)
 
+(define-coding-system 'windows-1256
+  "windows-1256 (Arabic) encoding (MIME: WINDOWS-1256)"
+  :coding-type 'charset
+  :mnemonic ?A
+  :charset-list '(windows-1256)
+  :mime-charset 'windows-1256)
+(define-coding-system-alias 'cp1256 'windows-1256)
+
+(set-language-info-alist
+ "Arabic" '((charset unicode)
+           (coding-system utf-8 iso-8859-6 windows-1256)
+           (coding-priority utf-8 iso-8859-6 windows-1256)
+           (input-method . "arabic")
+           (sample-text . "Arabic      السّلام عليكم")
+           (documentation . "Bidirectional editing is supported.")))
+
+(set-language-info-alist
+ "Persian" '((charset unicode)
+           (coding-system utf-8 iso-8859-6 windows-1256)
+           (coding-priority utf-8 iso-8859-6 windows-1256)
+           (input-method . "farsi-transliterate-banan")
+           (sample-text . "Persian     فارسی")
+           (documentation . "Bidirectional editing is supported.")))
+
+(set-char-table-range
+ composition-function-table
+ '(#x600 . #x6FF)
+ (list ["[\u0600-\u06FF]+" 0 font-shape-gstring]))
+
 (provide 'misc-lang)
 
-;; arch-tag: 6953585c-1a1a-4c09-be82-a2518afb6074
 ;;; misc-lang.el ends here