Switch to recommended form of GPLv3 permissions notice.
[bpt/emacs.git] / lisp / language / indian.el
CommitLineData
cdbe6a03 1;;; indian.el --- Indian languages support -*- coding: utf-8; -*-
4ed46869 2
38141d20 3;; Copyright (C) 1997, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
d4877ac1 4;; Free Software Foundation, Inc.
38141d20 5;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
eaa61218
KH
6;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number H14PRO021
4ed46869 8
cdbe6a03
KH
9;; Maintainer: Kenichi Handa <handa@m17n.org>
10;; KAWABATA, Taichi <kawabata@m17n.org>
51896ebc 11;; Keywords: multilingual, i18n, Indian
4ed46869
KH
12
13;; This file is part of GNU Emacs.
14
15;; GNU Emacs is free software; you can redistribute it and/or modify
16;; it under the terms of the GNU General Public License as published by
d7142f3e 17;; the Free Software Foundation; either version 3, or (at your option)
4ed46869
KH
18;; any later version.
19
20;; GNU Emacs is distributed in the hope that it will be useful,
21;; but WITHOUT ANY WARRANTY; without even the implied warranty of
22;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23;; GNU General Public License for more details.
24
25;; You should have received a copy of the GNU General Public License
e803d6bd 26;; along with GNU Emacs; see the file COPYING. If not, write to the
3a35cf56
LK
27;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
28;; Boston, MA 02110-1301, USA.
4ed46869
KH
29
30;;; Commentary:
31
cdbe6a03
KH
32;; This file contains definitions of Indian language environments, and
33;; setups for displaying the scrtipts used there.
4ed46869
KH
34
35;;; Code:
36
e1915ab3
KH
37(define-coding-system 'in-is13194-devanagari
38 "8-bit encoding for ASCII (MSB=0) and IS13194-Devanagari (MSB=1)."
39 :coding-type 'iso-2022
40 :mnemonic ?D
41 :designation [ascii indian-is13194 nil nil]
42 :charset-list '(ascii indian-is13194)
5e145d59
KH
43 :post-read-conversion 'in-is13194-post-read-conversion
44 :pre-write-conversion 'in-is13194-pre-write-conversion)
e1915ab3
KH
45
46(define-coding-system-alias 'devanagari 'in-is13194-devanagari)
8805e649 47
cdbe6a03
KH
48(set-language-info-alist
49 "Devanagari" '((charset unicode)
50 (coding-system utf-8)
51 (coding-priority utf-8)
52 (input-method . "dev-aiba")
53 (documentation . "\
54Such languages using Devanagari script as Hindi and Marathi
55are supported in this language environment."))
56 '("Indian"))
57
58(set-language-info-alist
59 "Bengali" '((charset unicode)
60 (coding-system utf-8)
61 (coding-priority utf-8)
62 (input-method . "bengali-itrans")
63 (documentation . "\
64Such languages using Bengali script as Bengali and Assamese
65are supported in this language environment."))
66 '("Indian"))
67
68(set-language-info-alist
69 "Punjabi" '((charset unicode)
70 (coding-system utf-8)
71 (coding-priority utf-8)
72 (input-method . "punjabi-itrans")
73 (documentation . "\
74North Indian language Punjabi is supported in this language environment."))
75 '("Indian"))
76
77(set-language-info-alist
78 "Gujarati" '((charset unicode)
79 (coding-system utf-8)
80 (coding-priority utf-8)
81 (input-method . "gujarati-itrans")
82 (documentation . "\
83North Indian language Gujarati is supported in this language environment."))
84 '("Indian"))
85
86(set-language-info-alist
87 "Oriya" '((charset unicode)
88 (coding-system utf-8)
89 (coding-priority utf-8)
90 (input-method . "oriya-itrans")
91 (documentation . "\
92Such languages using Oriya script as Oriya, Khonti, and Santali
93are supported in this language environment."))
94 '("Indian"))
95
96(set-language-info-alist
97 "Tamil" '((charset unicode)
98 (coding-system utf-8)
99 (coding-priority utf-8)
100 (input-method . "tamil-itrans")
101 (documentation . "\
102South Indian Language Tamil is supported in this language environment."))
103 '("Indian"))
104
105(set-language-info-alist
106 "Telugu" '((charset unicode)
107 (coding-system utf-8)
108 (coding-priority utf-8)
109 (input-method . "telugu-itrans")
110 (documentation . "\
111South Indian Language Telugu is supported in this language environment."))
112 '("Indian"))
113
114(set-language-info-alist
115 "Kannada" '((charset unicode)
116 (coding-system mule-utf-8)
117 (coding-priority mule-utf-8)
118 (input-method . "kannada-itrans")
119 (sample-text . "Kannada (ಕನ್ನಡ) ನಮಸ್ಕಾರ")
120 (documentation . "\
121Kannada language and script is supported in this language
122environment."))
123 '("Indian"))
124
125(set-language-info-alist
126 "Malayalam" '((charset unicode)
127 (coding-system utf-8)
128 (coding-priority utf-8)
129 (input-method . "malayalam-itrans")
130 (documentation . "\
131South Indian language Malayalam is supported in this language environment."))
132 '("Indian"))
098d86d5 133
9b87bff0
KH
134(let ((script-regexp-alist
135 '((devanagari . "[\x900-\x9FF\x200C\x200D]+")
136 (bengali . "[\x980-\x9FF\x200C\x200D]+")
137 (gurmukhi . "[\xA00-\xA7F\x200C\x200D]+")
138 (gujarati . "[\xA80-\xAFF\x200C\x200D]+")
139 (oriya . "[\xB00-\xB7F\x200C\x200D]+")
140 (tamil . "[\xB80-\xBFF\x200C\x200D]+")
141 (telugu . "[\xC00-\xC7F\x200C\x200D]+")
142 (kannada . "[\xC80-\xCFF\x200C\x200D]+")
cdbe6a03 143 (malayalam . "[\xD00-\xD7F\x200C\x200D]+"))))
9b87bff0
KH
144 (map-char-table #'(lambda (key val)
145 (let ((slot (assq val script-regexp-alist)))
146 (if slot
147 (set-char-table-range
148 composition-function-table key
149 (list (cons (cdr slot) 'font-shape-text))))))
150 char-script-table))
9b87bff0 151
41da80b1 152(provide 'indian)
1bec6fdb 153
cbee283d 154;; arch-tag: 83aa8fc7-7ee2-4364-a6e5-498f5e3b8c2f
4ed46869 155;;; indian.el ends here