(setup-japanese-environment-internal):
[bpt/emacs.git] / lisp / language / indian.el
index 2ee8c08..8bceb0a 100644 (file)
@@ -1,7 +1,8 @@
 ;;; indian.el --- Indian languages support -*- coding: iso-2022-7bit; -*-
 
-;; Copyright (C) 1997, 1999, 2001  Free Software Foundation, Inc.
-;; Copyright (C) 2002, 2003
+;; Copyright (C) 1997, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+;;   Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
 ;;   Registration Number H14PRO021
 
@@ -12,7 +13,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -158,6 +159,26 @@ The default value is `devanagari'.")
   (make-char-table nil)
   "Char table of regexps for composable Indian character sequence.")
 
+(let ((script-regexp-alist
+       '((devanagari . "[\x900-\x9FF\x200C\x200D]+")
+        (bengali . "[\x980-\x9FF\x200C\x200D]+")
+        (gurmukhi . "[\xA00-\xA7F\x200C\x200D]+")
+        (gujarati . "[\xA80-\xAFF\x200C\x200D]+")
+        (oriya . "[\xB00-\xB7F\x200C\x200D]+")
+        (tamil . "[\xB80-\xBFF\x200C\x200D]+")
+        (telugu . "[\xC00-\xC7F\x200C\x200D]+")
+        (kannada . "[\xC80-\xCFF\x200C\x200D]+")
+        (malayalam . "[\xD00-\xD7F\x200C\x200D]+")
+        (sinhala . "[\xD80-\xDFF\x200C\x200D]+"))))
+  (map-char-table #'(lambda (key val) 
+                     (let ((slot (assq val script-regexp-alist)))
+                       (if slot
+                           (set-char-table-range 
+                            composition-function-table key
+                            (list (cons (cdr slot) 'font-shape-text))))))
+                 char-script-table))
+                                             
+
 (provide 'indian)
 
 ;;; arch-tag: 83aa8fc7-7ee2-4364-a6e5-498f5e3b8c2f