Mercurial > emacs
annotate lisp/language/indian.el @ 92107:5a1ea5a32206
(CHECK_CHARSET, CHECK_CHARSET_GET_ID, CHECK_CHARSET_GET_ATTR):
Don't use the inexistent return value of wrong_type_argument.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 22 Feb 2008 17:24:05 +0000 |
parents | e687db4e3832 |
children | 1e3a407766b9 |
rev | line source |
---|---|
92067 | 1 ;;; indian.el --- Indian languages support -*- coding: utf-8; -*- |
17052 | 2 |
79711 | 3 ;; Copyright (C) 1997, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 |
74544 | 4 ;; Free Software Foundation, Inc. |
79711 | 5 ;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 |
62396 | 6 ;; National Institute of Advanced Industrial Science and Technology (AIST) |
7 ;; Registration Number H14PRO021 | |
17052 | 8 |
92067 | 9 ;; Maintainer: Kenichi Handa <handa@m17n.org> |
10 ;; KAWABATA, Taichi <kawabata@m17n.org> | |
42312 | 11 ;; Keywords: multilingual, i18n, Indian |
17052 | 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 | |
78309
0938de05f510
Restore comma mistakenly removed in last change.
Glenn Morris <rgm@gnu.org>
parents:
78300
diff
changeset
|
17 ;; the Free Software Foundation; either version 3, or (at your option) |
17052 | 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 | |
17314
f438ebf1c679
Fix FSF address in comment.
Kenichi Handa <handa@m17n.org>
parents:
17300
diff
changeset
|
26 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
64085 | 27 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
28 ;; Boston, MA 02110-1301, USA. | |
17052 | 29 |
30 ;;; Commentary: | |
31 | |
92067 | 32 ;; This file contains definitions of Indian language environments, and |
33 ;; setups for displaying the scrtipts used there. | |
17052 | 34 |
35 ;;; Code: | |
36 | |
88414
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42312
diff
changeset
|
37 (define-coding-system 'in-is13194-devanagari |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42312
diff
changeset
|
38 "8-bit encoding for ASCII (MSB=0) and IS13194-Devanagari (MSB=1)." |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42312
diff
changeset
|
39 :coding-type 'iso-2022 |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42312
diff
changeset
|
40 :mnemonic ?D |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42312
diff
changeset
|
41 :designation [ascii indian-is13194 nil nil] |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42312
diff
changeset
|
42 :charset-list '(ascii indian-is13194) |
89239
976a610d28e1
(in-is13194-devanagari): Fix
Kenichi Handa <handa@m17n.org>
parents:
89095
diff
changeset
|
43 :post-read-conversion 'in-is13194-post-read-conversion |
976a610d28e1
(in-is13194-devanagari): Fix
Kenichi Handa <handa@m17n.org>
parents:
89095
diff
changeset
|
44 :pre-write-conversion 'in-is13194-pre-write-conversion) |
17052 | 45 |
88414
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42312
diff
changeset
|
46 (define-coding-system-alias 'devanagari 'in-is13194-devanagari) |
46743
d341cac00baf
(in-is13194): Give correct `safe-chars' property.
Kenichi Handa <handa@m17n.org>
parents:
42312
diff
changeset
|
47 |
92067 | 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 . "\ | |
54 Such languages using Devanagari script as Hindi and Marathi | |
55 are supported in this language environment.")) | |
56 '("Indian")) | |
50256
104cf4fa2a8e
(indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents:
49704
diff
changeset
|
57 |
92067 | 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 . "\ | |
64 Such languages using Bengali script as Bengali and Assamese | |
65 are supported in this language environment.")) | |
66 '("Indian")) | |
50256
104cf4fa2a8e
(indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents:
49704
diff
changeset
|
67 |
92067 | 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 . "\ | |
74 North 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 . "\ | |
83 North Indian language Gujarati is supported in this language environment.")) | |
84 '("Indian")) | |
50256
104cf4fa2a8e
(indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents:
49704
diff
changeset
|
85 |
92067 | 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 . "\ | |
92 Such languages using Oriya script as Oriya, Khonti, and Santali | |
93 are supported in this language environment.")) | |
94 '("Indian")) | |
57537
b9687fdf909d
(indian-script-language-alist): Swap value and doc.
Kim F. Storm <storm@cua.dk>
parents:
52401
diff
changeset
|
95 |
92067 | 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 . "\ | |
102 South Indian Language Tamil is supported in this language environment.")) | |
103 '("Indian")) | |
57537
b9687fdf909d
(indian-script-language-alist): Swap value and doc.
Kim F. Storm <storm@cua.dk>
parents:
52401
diff
changeset
|
104 |
92067 | 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 . "\ | |
111 South Indian Language Telugu is supported in this language environment.")) | |
112 '("Indian")) | |
17052 | 113 |
92067 | 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 . "\ | |
121 Kannada language and script is supported in this language | |
122 environment.")) | |
123 '("Indian")) | |
17052 | 124 |
92067 | 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 . "\ | |
131 South Indian language Malayalam is supported in this language environment.")) | |
132 '("Indian")) | |
17052 | 133 |
91322
fc05151881d9
Set font-shape-text for all Indic characters
Kenichi Handa <handa@m17n.org>
parents:
90996
diff
changeset
|
134 (let ((script-regexp-alist |
fc05151881d9
Set font-shape-text for all Indic characters
Kenichi Handa <handa@m17n.org>
parents:
90996
diff
changeset
|
135 '((devanagari . "[\x900-\x9FF\x200C\x200D]+") |
fc05151881d9
Set font-shape-text for all Indic characters
Kenichi Handa <handa@m17n.org>
parents:
90996
diff
changeset
|
136 (bengali . "[\x980-\x9FF\x200C\x200D]+") |
fc05151881d9
Set font-shape-text for all Indic characters
Kenichi Handa <handa@m17n.org>
parents:
90996
diff
changeset
|
137 (gurmukhi . "[\xA00-\xA7F\x200C\x200D]+") |
fc05151881d9
Set font-shape-text for all Indic characters
Kenichi Handa <handa@m17n.org>
parents:
90996
diff
changeset
|
138 (gujarati . "[\xA80-\xAFF\x200C\x200D]+") |
fc05151881d9
Set font-shape-text for all Indic characters
Kenichi Handa <handa@m17n.org>
parents:
90996
diff
changeset
|
139 (oriya . "[\xB00-\xB7F\x200C\x200D]+") |
fc05151881d9
Set font-shape-text for all Indic characters
Kenichi Handa <handa@m17n.org>
parents:
90996
diff
changeset
|
140 (tamil . "[\xB80-\xBFF\x200C\x200D]+") |
fc05151881d9
Set font-shape-text for all Indic characters
Kenichi Handa <handa@m17n.org>
parents:
90996
diff
changeset
|
141 (telugu . "[\xC00-\xC7F\x200C\x200D]+") |
fc05151881d9
Set font-shape-text for all Indic characters
Kenichi Handa <handa@m17n.org>
parents:
90996
diff
changeset
|
142 (kannada . "[\xC80-\xCFF\x200C\x200D]+") |
92067 | 143 (malayalam . "[\xD00-\xD7F\x200C\x200D]+")))) |
91322
fc05151881d9
Set font-shape-text for all Indic characters
Kenichi Handa <handa@m17n.org>
parents:
90996
diff
changeset
|
144 (map-char-table #'(lambda (key val) |
fc05151881d9
Set font-shape-text for all Indic characters
Kenichi Handa <handa@m17n.org>
parents:
90996
diff
changeset
|
145 (let ((slot (assq val script-regexp-alist))) |
fc05151881d9
Set font-shape-text for all Indic characters
Kenichi Handa <handa@m17n.org>
parents:
90996
diff
changeset
|
146 (if slot |
fc05151881d9
Set font-shape-text for all Indic characters
Kenichi Handa <handa@m17n.org>
parents:
90996
diff
changeset
|
147 (set-char-table-range |
fc05151881d9
Set font-shape-text for all Indic characters
Kenichi Handa <handa@m17n.org>
parents:
90996
diff
changeset
|
148 composition-function-table key |
fc05151881d9
Set font-shape-text for all Indic characters
Kenichi Handa <handa@m17n.org>
parents:
90996
diff
changeset
|
149 (list (cons (cdr slot) 'font-shape-text)))))) |
fc05151881d9
Set font-shape-text for all Indic characters
Kenichi Handa <handa@m17n.org>
parents:
90996
diff
changeset
|
150 char-script-table)) |
50256
104cf4fa2a8e
(indian-font-foundry): New variable.
Kenichi Handa <handa@m17n.org>
parents:
49704
diff
changeset
|
151 |
33778 | 152 (provide 'indian) |
41469 | 153 |
52401 | 154 ;;; arch-tag: 83aa8fc7-7ee2-4364-a6e5-498f5e3b8c2f |
17052 | 155 ;;; indian.el ends here |