aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/language
diff options
context:
space:
mode:
authorKenichi Handa2004-04-16 12:51:06 +0000
committerKenichi Handa2004-04-16 12:51:06 +0000
commit6b61353c0a0320ee15bb6488149735381fed62ec (patch)
treee69adba60e504a5a37beb556ad70084de88a7aab /lisp/language
parentdc6a28319312fe81f7a1015e363174022313f0bd (diff)
downloademacs-6b61353c0a0320ee15bb6488149735381fed62ec.tar.gz
emacs-6b61353c0a0320ee15bb6488149735381fed62ec.zip
Sync to HEAD
Diffstat (limited to 'lisp/language')
-rw-r--r--lisp/language/china-util.el1
-rw-r--r--lisp/language/chinese.el7
-rw-r--r--lisp/language/cyril-util.el1
-rw-r--r--lisp/language/cyrillic.el29
-rw-r--r--lisp/language/czech.el1
-rw-r--r--lisp/language/devan-util.el23
-rw-r--r--lisp/language/devanagari.el1
-rw-r--r--lisp/language/english.el1
-rw-r--r--lisp/language/ethio-util.el18
-rw-r--r--lisp/language/ethiopic.el1
-rw-r--r--lisp/language/european.el12
-rw-r--r--lisp/language/georgian.el1
-rw-r--r--lisp/language/greek.el1
-rw-r--r--lisp/language/hebrew.el1
-rw-r--r--lisp/language/ind-util.el8
-rw-r--r--lisp/language/indian.el1
-rw-r--r--lisp/language/japan-util.el1
-rw-r--r--lisp/language/japanese.el1
-rw-r--r--lisp/language/kannada.el54
-rw-r--r--lisp/language/knd-util.el541
-rw-r--r--lisp/language/korea-util.el1
-rw-r--r--lisp/language/korean.el1
-rw-r--r--lisp/language/lao-util.el1
-rw-r--r--lisp/language/lao.el1
-rw-r--r--lisp/language/malayalam.el1
-rw-r--r--lisp/language/misc-lang.el1
-rw-r--r--lisp/language/mlm-util.el2
-rw-r--r--lisp/language/romanian.el1
-rw-r--r--lisp/language/slovak.el1
-rw-r--r--lisp/language/tamil.el1
-rw-r--r--lisp/language/thai-util.el1
-rw-r--r--lisp/language/thai.el1
-rw-r--r--lisp/language/tibet-util.el1
-rw-r--r--lisp/language/tibetan.el1
-rw-r--r--lisp/language/tml-util.el2
-rw-r--r--lisp/language/utf-8-lang.el2
-rw-r--r--lisp/language/viet-util.el1
-rw-r--r--lisp/language/vietnamese.el1
38 files changed, 693 insertions, 32 deletions
diff --git a/lisp/language/china-util.el b/lisp/language/china-util.el
index 3f6dee9488f..03b41af7032 100644
--- a/lisp/language/china-util.el
+++ b/lisp/language/china-util.el
@@ -190,4 +190,5 @@ Return the length of resulting text."
190;; 190;;
191(provide 'china-util) 191(provide 'china-util)
192 192
193;;; arch-tag: 5a47b084-b9ac-420e-8191-70c5b3a14836
193;;; china-util.el ends here 194;;; china-util.el ends here
diff --git a/lisp/language/chinese.el b/lisp/language/chinese.el
index 2b96a9f8f40..7e03ed40dda 100644
--- a/lisp/language/chinese.el
+++ b/lisp/language/chinese.el
@@ -107,7 +107,8 @@
107 (input-method . "chinese-py-punct") 107 (input-method . "chinese-py-punct")
108 (features china-util) 108 (features china-util)
109 (sample-text . "Chinese ($AVPND(B,$AFUM(;0(B,$A::So(B) $ADc:C(B") 109 (sample-text . "Chinese ($AVPND(B,$AFUM(;0(B,$A::So(B) $ADc:C(B")
110 (documentation . "Support for Chinese GB2312 character set.")) 110 (documentation . "Support for Chinese GB2312 character set.")
111 (tutorial . "TUTORIAL.cn"))
111 '("Chinese")) 112 '("Chinese"))
112 113
113;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 114;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -131,7 +132,8 @@
131 (input-method . "chinese-py-punct-b5") 132 (input-method . "chinese-py-punct-b5")
132 (features china-util) 133 (features china-util)
133 (sample-text . "Cantonese ($(0GnM$(B,$(0N]0*Hd(B) $(0*/=((B, $(0+$)p(B") 134 (sample-text . "Cantonese ($(0GnM$(B,$(0N]0*Hd(B) $(0*/=((B, $(0+$)p(B")
134 (documentation . "Support for Chinese Big5 character set.")) 135 (documentation . "Support for Chinese Big5 character set.")
136 (tutorial . "TUTORIAL.zh"))
135 '("Chinese")) 137 '("Chinese"))
136 138
137(define-coding-system 'chinese-big5-hkscs 139(define-coding-system 'chinese-big5-hkscs
@@ -253,4 +255,5 @@ converted to CNS)."))
253 255
254(provide 'chinese) 256(provide 'chinese)
255 257
258;;; arch-tag: b82fcf7a-84f6-4e0b-b38c-1742dac0e09f
256;;; chinese.el ends here 259;;; chinese.el ends here
diff --git a/lisp/language/cyril-util.el b/lisp/language/cyril-util.el
index 5d53f224a0a..1a5c435328d 100644
--- a/lisp/language/cyril-util.el
+++ b/lisp/language/cyril-util.el
@@ -193,4 +193,5 @@ If the argument is nil, we return the display table to its standard state."
193;; coding: iso-2022-7bit 193;; coding: iso-2022-7bit
194;; End: 194;; End:
195 195
196;;; arch-tag: f6d9dd5d-685c-45d6-a5d8-1e2178228b7e
196;;; cyril-util.el ends here 197;;; cyril-util.el ends here
diff --git a/lisp/language/cyrillic.el b/lisp/language/cyrillic.el
index f95a5427a12..e879b4d0b1a 100644
--- a/lisp/language/cyrillic.el
+++ b/lisp/language/cyrillic.el
@@ -122,6 +122,23 @@ Support for Russian using koi8-r and the russian-computer input method.")
122 (tutorial . "TUTORIAL.ru")) 122 (tutorial . "TUTORIAL.ru"))
123 '("Cyrillic")) 123 '("Cyrillic"))
124 124
125(define-coding-system 'koi8-u
126 "KOI8-U 8-bit encoding for Cyrillic (MIME: KOI8-U)"
127 :coding-type 'charset
128 :mnemonic ?U
129 :charset-list '(koi8-u)
130 :mime-charset 'koi8-u)
131
132(set-language-info-alist
133 "Ukrainian" `((charset koi8-u)
134 (coding-system koi8-u)
135 (coding-priority koi8-u)
136 (nonascii-translation . koi8-u)
137 (input-method . "ukrainian-computer")
138 (documentation
139 . "Support for Ukrainian with KOI8-U character set."))
140 '("Cyrillic"))
141
125;;; ALTERNATIVNYJ stuff 142;;; ALTERNATIVNYJ stuff
126 143
127(define-coding-system 'cyrillic-alternativnyj 144(define-coding-system 'cyrillic-alternativnyj
@@ -220,13 +237,20 @@ Support for Russian using koi8-r and the russian-computer input method.")
220 (documentation . "Support for Tajik using KOI8-T.")) 237 (documentation . "Support for Tajik using KOI8-T."))
221 '("Cyrillic")) 238 '("Cyrillic"))
222 239
240(let ((elt `("microsoft-cp1251" windows-1251 1
241 ,(get 'encode-windows-1251 'translation-table)))
242 (slot (assoc "microsoft-cp1251" ctext-non-standard-encodings-alist)))
243 (if slot
244 (setcdr slot (cdr elt))
245 (push elt ctext-non-standard-encodings-alist)))
246
223(set-language-info-alist 247(set-language-info-alist
224 "Bulgarian" `((coding-system windows-1251) 248 "Bulgarian" `((coding-system windows-1251)
225 (coding-priority windows-1251) 249 (coding-priority windows-1251)
226 (nonascii-translation . windows-1251) 250 (nonascii-translation . windows-1251)
227 (charset windows-1251) 251 (charset windows-1251)
252 (ctext-non-standard-encodings "microsoft-cp1251")
228 (input-method . "bulgarian-bds") 253 (input-method . "bulgarian-bds")
229 (features code-pages)
230 (documentation 254 (documentation
231 . "Support for Bulgrian with windows-1251 character set.")) 255 . "Support for Bulgrian with windows-1251 character set."))
232 '("Cyrillic")) 256 '("Cyrillic"))
@@ -236,8 +260,8 @@ Support for Russian using koi8-r and the russian-computer input method.")
236 (coding-priority windows-1251) 260 (coding-priority windows-1251)
237 (nonascii-translation . windows-1251) 261 (nonascii-translation . windows-1251)
238 (charset windows-1251) 262 (charset windows-1251)
263 (ctext-non-standard-encodings "microsoft-cp1251")
239 (input-method . "belarusian") 264 (input-method . "belarusian")
240 (features code-pages)
241 (documentation 265 (documentation
242 . "Support for Belarusian with windows-1251 character set. 266 . "Support for Belarusian with windows-1251 character set.
243\(The name Belarusian replaced Byelorussian in the early 1990s.)")) 267\(The name Belarusian replaced Byelorussian in the early 1990s.)"))
@@ -253,4 +277,5 @@ Support for Russian using koi8-r and the russian-computer input method.")
253 277
254(provide 'cyrillic) 278(provide 'cyrillic)
255 279
280;;; arch-tag: bda71ae0-ba41-4cb6-a6e0-1dff542313d3
256;;; cyrillic.el ends here 281;;; cyrillic.el ends here
diff --git a/lisp/language/czech.el b/lisp/language/czech.el
index 0d3cb342d45..9aca0d16d49 100644
--- a/lisp/language/czech.el
+++ b/lisp/language/czech.el
@@ -46,4 +46,5 @@ and selects the Czech tutorial."))
46 46
47(provide 'czech) 47(provide 'czech)
48 48
49;;; arch-tag: 45ac0d83-ca13-4b5e-9e82-821e44080c24
49;;; czech.el ends here 50;;; czech.el ends here
diff --git a/lisp/language/devan-util.el b/lisp/language/devan-util.el
index 4e3fbc9a257..64dbf576af3 100644
--- a/lisp/language/devan-util.el
+++ b/lisp/language/devan-util.el
@@ -85,6 +85,7 @@
85 (devanagari-compose-region (point-min) (point-max)) 85 (devanagari-compose-region (point-min) (point-max))
86 (buffer-string))) 86 (buffer-string)))
87 87
88;;;###autoload
88(defun devanagari-post-read-conversion (len) 89(defun devanagari-post-read-conversion (len)
89 (save-excursion 90 (save-excursion
90 (save-restriction 91 (save-restriction
@@ -586,19 +587,14 @@ preferred rule from the sanskrit fonts." )
586 (setq preceding-r t) 587 (setq preceding-r t)
587 (goto-char (+ 2 (point)))) 588 (goto-char (+ 2 (point))))
588 ;; translate the rest characters into glyphs 589 ;; translate the rest characters into glyphs
589 (while (not (eobp)) 590 (while (re-search-forward dev-char-glyph-regexp nil t)
590 (if (looking-at dev-char-glyph-regexp) 591 (setq match-str (match-string 0))
591 (let ((end (match-end 0))) 592 (setq glyph-str
592 (setq match-str (match-string 0) 593 (concat glyph-str
593 glyph-str 594 (gethash match-str dev-char-glyph-hash)))
594 (concat glyph-str 595 ;; count the number of consonant-glyhs.
595 (gethash match-str dev-char-glyph-hash))) 596 (if (string-match devanagari-consonant match-str)
596 ;; count the number of consonant-glyhs. 597 (setq cons-num (1+ cons-num))))
597 (if (string-match devanagari-consonant match-str)
598 (setq cons-num (1+ cons-num)))
599 (goto-char end))
600 (setq glyph-str (concat glyph-str (string (following-char))))
601 (forward-char 1)))
602 ;; preceding-r must be attached before the anuswar if exists. 598 ;; preceding-r must be attached before the anuswar if exists.
603 (if preceding-r 599 (if preceding-r
604 (if last-modifier 600 (if last-modifier
@@ -652,4 +648,5 @@ preferred rule from the sanskrit fonts." )
652 648
653(provide 'devan-util) 649(provide 'devan-util)
654 650
651;;; arch-tag: 9bc4d6e3-f2b9-4110-886e-ff9b66b7eebc
655;;; devan-util.el ends here 652;;; devan-util.el ends here
diff --git a/lisp/language/devanagari.el b/lisp/language/devanagari.el
index 94f11b403d4..6b1ff46a0af 100644
--- a/lisp/language/devanagari.el
+++ b/lisp/language/devanagari.el
@@ -51,4 +51,5 @@ are supported in this language environment."))
51 51
52(provide 'devanagari) 52(provide 'devanagari)
53 53
54;;; arch-tag: fd13667d-868b-41e8-81ef-79dd28bbfed2
54;;; devanagari.el ends here 55;;; devanagari.el ends here
diff --git a/lisp/language/english.el b/lisp/language/english.el
index 342dea6da98..6d135197460 100644
--- a/lisp/language/english.el
+++ b/lisp/language/english.el
@@ -65,4 +65,5 @@ Nothing special is needed to handle English.")
65(set-language-info-alist 65(set-language-info-alist
66 "ASCII" (cdr (assoc "English" language-info-alist))) 66 "ASCII" (cdr (assoc "English" language-info-alist)))
67 67
68;;; arch-tag: e440bdb0-91b0-4fb4-ae38-425780f8f745
68;;; english.el ends here 69;;; english.el ends here
diff --git a/lisp/language/ethio-util.el b/lisp/language/ethio-util.el
index 3b59ddca661..5a81f59f9dc 100644
--- a/lisp/language/ethio-util.el
+++ b/lisp/language/ethio-util.el
@@ -417,6 +417,9 @@ If nil, use uppercases.")
417 nil nil nil nil nil 417 nil nil nil nil nil
418 ]) 418 ])
419 419
420;; To avoid byte-compiler warnings. It should never be set globally.
421(defvar ethio-sera-being-called-by-w3)
422
420;;;###autoload 423;;;###autoload
421(defun ethio-sera-to-fidel-region (beg end &optional secondary force) 424(defun ethio-sera-to-fidel-region (beg end &optional secondary force)
422 "Convert the characters in region from SERA to FIDEL. 425 "Convert the characters in region from SERA to FIDEL.
@@ -587,8 +590,8 @@ the conversion of \"a\"."
587 (cond 590 (cond
588 591
589 ;; skip from "<" to ">" (or from "&" to ";") if in w3-mode 592 ;; skip from "<" to ">" (or from "&" to ";") if in w3-mode
590 ((and (boundp 'sera-being-called-by-w3) 593 ((and (boundp 'ethio-sera-being-called-by-w3)
591 sera-being-called-by-w3 594 ethio-sera-being-called-by-w3
592 (or (= ch ?<) (= ch ?&))) 595 (or (= ch ?<) (= ch ?&)))
593 (search-forward (if (= ch ?<) ">" ";") 596 (search-forward (if (= ch ?<) ">" ";")
594 nil 0)) 597 nil 0))
@@ -1174,8 +1177,8 @@ See also the descriptions of the variables
1174 (goto-char (1+ (match-end 0)))) ; because we inserted one byte (\) 1177 (goto-char (1+ (match-end 0)))) ; because we inserted one byte (\)
1175 1178
1176 ;; skip from "<" to ">" (or from "&" to ";") if called from w3 1179 ;; skip from "<" to ">" (or from "&" to ";") if called from w3
1177 ((and (boundp 'sera-being-called-by-w3) 1180 ((and (boundp 'ethio-sera-being-called-by-w3)
1178 sera-being-called-by-w3 1181 ethio-sera-being-called-by-w3
1179 (or (= ch ?<) (= ch ?&))) 1182 (or (= ch ?<) (= ch ?&)))
1180 (search-forward (if (= ch ?<) ">" ";") 1183 (search-forward (if (= ch ?<) ">" ";")
1181 nil 0)) 1184 nil 0))
@@ -1826,7 +1829,7 @@ Otherwise, [0-9A-F]."
1826 1829
1827;;;###autoload 1830;;;###autoload
1828(defun ethio-find-file nil 1831(defun ethio-find-file nil
1829 "Transcribe file content into Ethiopic dependig on filename suffix." 1832 "Transcribe file content into Ethiopic depending on filename suffix."
1830 (cond 1833 (cond
1831 1834
1832 ((string-match "\\.sera$" (buffer-file-name)) 1835 ((string-match "\\.sera$" (buffer-file-name))
@@ -1835,7 +1838,7 @@ Otherwise, [0-9A-F]."
1835 (set-buffer-modified-p nil))) 1838 (set-buffer-modified-p nil)))
1836 1839
1837 ((string-match "\\.html$" (buffer-file-name)) 1840 ((string-match "\\.html$" (buffer-file-name))
1838 (let ((sera-being-called-by-w3 t)) 1841 (let ((ethio-sera-being-called-by-w3 t))
1839 (save-excursion 1842 (save-excursion
1840 (ethio-sera-to-fidel-marker 'force) 1843 (ethio-sera-to-fidel-marker 'force)
1841 (goto-char (point-min)) 1844 (goto-char (point-min))
@@ -1872,7 +1875,7 @@ Otherwise, [0-9A-F]."
1872 1875
1873 ((string-match "\\.html$" (buffer-file-name)) 1876 ((string-match "\\.html$" (buffer-file-name))
1874 (save-excursion 1877 (save-excursion
1875 (let ((sera-being-called-by-w3 t) 1878 (let ((ethio-sera-being-called-by-w3 t)
1876 (lq (aref ethio-fidel-to-sera-map 461)) 1879 (lq (aref ethio-fidel-to-sera-map 461))
1877 (rq (aref ethio-fidel-to-sera-map 462))) 1880 (rq (aref ethio-fidel-to-sera-map 462)))
1878 (aset ethio-fidel-to-sera-map 461 "&laquote;") 1881 (aset ethio-fidel-to-sera-map 461 "&laquote;")
@@ -2005,4 +2008,5 @@ mark."
2005;; 2008;;
2006(provide 'ethio-util) 2009(provide 'ethio-util)
2007 2010
2011;;; arch-tag: c8feb3d6-39bf-4b0a-b6ef-26f03fbc8140
2008;;; ethio-util.el ends here 2012;;; ethio-util.el ends here
diff --git a/lisp/language/ethiopic.el b/lisp/language/ethiopic.el
index b198cf43084..a0140b585fb 100644
--- a/lisp/language/ethiopic.el
+++ b/lisp/language/ethiopic.el
@@ -80,4 +80,5 @@
80 80
81(provide 'ethiopic) 81(provide 'ethiopic)
82 82
83;;; arch-tag: e81329d9-1286-43ba-92fd-54ce5c7b213c
83;;; ethiopic.el ends here 84;;; ethiopic.el ends here
diff --git a/lisp/language/european.el b/lisp/language/european.el
index 2035d479487..3da1850a718 100644
--- a/lisp/language/european.el
+++ b/lisp/language/european.el
@@ -28,9 +28,8 @@
28 28
29;;; Commentary: 29;;; Commentary:
30 30
31;; For European scripts, character sets ISO8859-1,2,3,4,9,10,13,14,15, 31;; For European scripts, all the ISO Latin character sets are
32;; windows-1250,2,4,7, mac-roman, adobe-standard-encoding, cp850 and 32;; supported, along with various others.
33;; next are supported.
34 33
35;;; Code: 34;;; Code:
36 35
@@ -272,7 +271,7 @@ covered by other ISO-8859 character sets:
272 (unibyte-display . iso-latin-9) 271 (unibyte-display . iso-latin-9)
273 (input-method . "latin-9-prefix") 272 (input-method . "latin-9-prefix")
274 (sample-text 273 (sample-text
275 . "AVE. ,b&(48<=>(B ,b$(B") 274 . "AVE. ,B)9.>,b<=,_/(B ,b$(B")
276 (documentation . "\ 275 (documentation . "\
277This language environment is a generic one for the Latin-9 (ISO-8859-15) 276This language environment is a generic one for the Latin-9 (ISO-8859-15)
278character set which supports the same languages as Latin-1 with the 277character set which supports the same languages as Latin-1 with the
@@ -484,7 +483,7 @@ and it selects the Spanish tutorial."))
484 (nonascii-translation . iso-8859-9) 483 (nonascii-translation . iso-8859-9)
485 (unibyte-display . iso-latin-5) 484 (unibyte-display . iso-latin-5)
486 (input-method . "turkish-postfix") 485 (input-method . "turkish-postfix")
487 (sample-text . "Turkish (T,M|(Brk,Mg(Be) Merhaba") 486 (sample-text . "Turkish (T,A|(Brk,Ag(Be) Merhaba")
488 (setup-function 487 (setup-function
489 . (lambda () 488 . (lambda ()
490 (set-case-syntax-pair ?I ?,C9(B (standard-case-table)) 489 (set-case-syntax-pair ?I ?,C9(B (standard-case-table))
@@ -510,7 +509,7 @@ method and applying Turkish case rules for the characters i, I, ,C9(B, ,C)(B
510 (nonascii-translation . iso-8859-2) 509 (nonascii-translation . iso-8859-2)
511 (unibyte-display . iso-8859-2) 510 (unibyte-display . iso-8859-2)
512 (tutorial . "TUTORIAL.pl") 511 (tutorial . "TUTORIAL.pl")
513 (sample-text . "P,Bs(Bjd,B<(B, ki,Bq(B-,B?(Be t,Bj(B chmurno,B6f(B w g,B31(Bb flaszy") 512 (sample-text . "P,As(Bjd,B<(B, ki,Bq(B-,B?(Be t,Bj(B chmurno,B6f(B w g,B31(Bb flaszy")
514 (documentation . t)) 513 (documentation . t))
515 '("European")) 514 '("European"))
516 515
@@ -724,4 +723,5 @@ or nil if no characters are composed."
724 723
725(provide 'european) 724(provide 'european)
726 725
726;;; arch-tag: 9e018b12-fb02-4120-907b-9adeaf84b5c2
727;;; european.el ends here 727;;; european.el ends here
diff --git a/lisp/language/georgian.el b/lisp/language/georgian.el
index f38529d20aa..40f84c0dc68 100644
--- a/lisp/language/georgian.el
+++ b/lisp/language/georgian.el
@@ -49,4 +49,5 @@
49 49
50(provide 'georgian) 50(provide 'georgian)
51 51
52;;; arch-tag: 15499fbb-26d4-4a13-9d78-135eef7d32f5
52;;; georgian.el ends here 53;;; georgian.el ends here
diff --git a/lisp/language/greek.el b/lisp/language/greek.el
index 6061ed203c8..e3625b4c7c2 100644
--- a/lisp/language/greek.el
+++ b/lisp/language/greek.el
@@ -82,4 +82,5 @@
82 82
83(provide 'greek) 83(provide 'greek)
84 84
85;;; arch-tag: 9ba48d79-84bc-45e1-9318-685dc3921410
85;;; greek.el ends here 86;;; greek.el ends here
diff --git a/lisp/language/hebrew.el b/lisp/language/hebrew.el
index 871ec1b223e..bc59d23b3ee 100644
--- a/lisp/language/hebrew.el
+++ b/lisp/language/hebrew.el
@@ -85,4 +85,5 @@ Right-to-left writing is not yet supported.")))
85 85
86(provide 'hebrew) 86(provide 'hebrew)
87 87
88;;; arch-tag: 3ca04f32-3f1e-498e-af46-8267498ba5d9
88;;; hebrew.el ends here 89;;; hebrew.el ends here
diff --git a/lisp/language/ind-util.el b/lisp/language/ind-util.el
index 862ebf39e84..80be2a97e17 100644
--- a/lisp/language/ind-util.el
+++ b/lisp/language/ind-util.el
@@ -714,9 +714,10 @@ FUNCTION will be called 15 times."
714 (ucs-oriya-to-is13194-alist nil) 714 (ucs-oriya-to-is13194-alist nil)
715 (ucs-tamil-to-is13194-alist nil) 715 (ucs-tamil-to-is13194-alist nil)
716 (ucs-telugu-to-is13194-alist nil) 716 (ucs-telugu-to-is13194-alist nil)
717 (ucs-malayalam-to-is13194-alist nil)) 717 (ucs-malayalam-to-is13194-alist nil)
718 (ucs-kannada-to-is13194-alist nil))
718 (dolist (script '(devanagari bengali assamese gurmukhi gujarati 719 (dolist (script '(devanagari bengali assamese gurmukhi gujarati
719 oriya tamil telugu malayalam)) 720 oriya tamil telugu malayalam kannada))
720 (let ((hashtable (intern (concat "is13194-to-ucs-" 721 (let ((hashtable (intern (concat "is13194-to-ucs-"
721 (symbol-name script) "-hashtbl" ))) 722 (symbol-name script) "-hashtbl" )))
722 (regexp (intern (concat "is13194-to-ucs-" 723 (regexp (intern (concat "is13194-to-ucs-"
@@ -764,6 +765,8 @@ FUNCTION will be called 15 times."
764(defvar is13194-to-ucs-telugu-regexp nil) 765(defvar is13194-to-ucs-telugu-regexp nil)
765(defvar is13194-to-ucs-malayalam-hashtbl nil) 766(defvar is13194-to-ucs-malayalam-hashtbl nil)
766(defvar is13194-to-ucs-malayalam-regexp nil) 767(defvar is13194-to-ucs-malayalam-regexp nil)
768(defvar is13194-to-ucs-kannada-hashtbl nil)
769(defvar is13194-to-ucs-kannada-regexp nil)
767 770
768(defvar ucs-to-is13194-regexp 771(defvar ucs-to-is13194-regexp
769 ;; only Devanagari is supported now. 772 ;; only Devanagari is supported now.
@@ -1221,4 +1224,5 @@ Returns new end position."
1221 1224
1222(provide 'ind-util) 1225(provide 'ind-util)
1223 1226
1227;;; arch-tag: 59aacd71-46c2-4cb3-bb26-e12bbad55545
1224;;; ind-util.el ends here 1228;;; ind-util.el ends here
diff --git a/lisp/language/indian.el b/lisp/language/indian.el
index d7b4c365bc8..a15df9c45aa 100644
--- a/lisp/language/indian.el
+++ b/lisp/language/indian.el
@@ -157,4 +157,5 @@ The default value is `devanagari'.")
157 157
158(provide 'indian) 158(provide 'indian)
159 159
160;;; arch-tag: 83aa8fc7-7ee2-4364-a6e5-498f5e3b8c2f
160;;; indian.el ends here 161;;; indian.el ends here
diff --git a/lisp/language/japan-util.el b/lisp/language/japan-util.el
index 7c2cc069241..e9a80fc99a7 100644
--- a/lisp/language/japan-util.el
+++ b/lisp/language/japan-util.el
@@ -320,4 +320,5 @@ If non-nil, second arg INITIAL-INPUT is a string to insert before reading."
320;; 320;;
321(provide 'japan-util) 321(provide 'japan-util)
322 322
323;;; arch-tag: b579595c-c9ad-4b57-9314-98cd8b214f89
323;;; japan-util.el ends here 324;;; japan-util.el ends here
diff --git a/lisp/language/japanese.el b/lisp/language/japanese.el
index 961e724e968..b4ec979d425 100644
--- a/lisp/language/japanese.el
+++ b/lisp/language/japanese.el
@@ -244,4 +244,5 @@ eucJP-ms is defined in <http://www.opengroup.or.jp/jvc/cde/appendix.html>."
244 244
245(provide 'japanese) 245(provide 'japanese)
246 246
247;;; arch-tag: 450f5537-9d53-4d5e-b731-4cf116d8cbc9
247;;; japanese.el ends here 248;;; japanese.el ends here
diff --git a/lisp/language/kannada.el b/lisp/language/kannada.el
new file mode 100644
index 00000000000..1a3575f24db
--- /dev/null
+++ b/lisp/language/kannada.el
@@ -0,0 +1,54 @@
1;;; kannada.el --- Support for Kannada -*- coding: iso-2022-7bit; no-byte-compile: t -*-
2
3;; Copyright (C) 2003 Free Software Foundation, Inc.
4
5;; Maintainer: CHOWKSEY, Kailash C. <klchxbec@m-net.arbornet.org>
6;; Keywords: multilingual, Indian, Kannada
7
8;; This file is part of GNU Emacs.
9
10;; GNU Emacs is free software; you can redistribute it and/or modify
11;; it under the terms of the GNU General Public License as published by
12;; the Free Software Foundation; either version 2, or (at your option)
13;; any later version.
14
15;; GNU Emacs is distributed in the hope that it will be useful,
16;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;; GNU General Public License for more details.
19
20;; You should have received a copy of the GNU General Public License
21;; along with GNU Emacs; see the file COPYING. If not, write to the
22;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23;; Boston, MA 02111-1307, USA.
24
25;;; Commentary:
26
27;; This file defines language-info of Kannada script.
28
29;;; Code:
30
31(set-language-info-alist
32 "Kannada" '((charset mule-unicode-0100-24ff indian-is13194
33 indian-2-column indian-glyph ;; comment out later
34 )
35 (coding-system mule-utf-8)
36 (coding-priority mule-utf-8)
37 (input-method . "kannada-itrans")
38 (features knd-util)
39 (sample-text
40 . (kannada-compose-string
41 (copy-sequence "Kannada ($,1>u?(?M?(?!(B) $,1?(?.?8?M>u?>?0(B")))
42 (documentation . "\
43Kannada language and script is supported in this language
44environment."))
45 '("Indian"))
46
47;; For automatic composition.
48(set-char-table-range composition-function-table '(#x0c80 . #x0cff)
49 'kannada-composition-function)
50
51(provide 'kannada)
52
53;;; arch-tag: 880ba90b-f6f5-4131-bc1d-930705b78416
54;;; kannada.el ends here
diff --git a/lisp/language/knd-util.el b/lisp/language/knd-util.el
new file mode 100644
index 00000000000..75e8b93d17a
--- /dev/null
+++ b/lisp/language/knd-util.el
@@ -0,0 +1,541 @@
1;;; knd-util.el --- Support for composing Kannada characters
2
3;; Copyright (C) 2003 Free Software Foundation, Inc.
4
5;; Maintainer: Maintainer: CHOWKSEY, Kailash C. <klchxbec@m-net.arbornet.org>
6;; Keywords: multilingual, Kannada
7
8;; This file is part of GNU Emacs.
9
10;; GNU Emacs is free software; you can redistribute it and/or modify
11;; it under the terms of the GNU General Public License as published by
12;; the Free Software Foundation; either version 2, or (at your option)
13;; any later version.
14
15;; GNU Emacs is distributed in the hope that it will be useful,
16;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;; GNU General Public License for more details.
19
20;; You should have received a copy of the GNU General Public License
21;; along with GNU Emacs; see the file COPYING. If not, write to the
22;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23;; Boston, MA 02111-1307, USA.
24
25;; Created: Jul. 14. 2003
26
27;;; Commentary:
28
29;; This file provides character(Unicode) to glyph(CDAC) conversion and
30;; composition of Kannada script characters.
31
32;;; Code:
33
34;;;###autoload
35
36;; Kannada Composable Pattern
37;; C .. Consonants
38;; V .. Vowel
39;; H .. Virama
40;; M .. Matra
41;; V .. Vowel
42;; (N .. Zerowidth Non Joiner)
43;; (J .. Zerowidth Joiner. )
44;; 1. vowel
45;; V(A)?
46;; 2. syllable : maximum of 5 consecutive consonants. (e.g. kartsnya)
47;; ((CH)?(CH)?(CH)?CH)?C(H|M?)?
48
49(defconst kannada-consonant
50 "[$,1>u(B-$,1?9(B]")
51
52(defconst kannada-consonant-needs-twirl
53 "[$,1>u>w(B-$,1>{>}(B-$,1>~? (B-$,1?"?$(B-$,1?+?-?0?3(B-$,1?9(B]\\($,1?M(B[$,1>u(B-$,1?9(B]\\)*[$,1?A?B?C?D>b(B]?$")
54
55(defconst kannada-composable-pattern
56 (concat
57 "\\([$,1>b(B-$,1>t?`>l(B]\\)\\|[$,1>c(B]"
58 "\\|\\("
59 "\\(?:\\(?:[$,1>u(B-$,1?9(B]$,1?M(B\\)?\\(?:[$,1>u(B-$,1?9(B]$,1?M(B\\)?\\(?:[$,1>u(B-$,1?9(B]$,1?M(B\\)?[$,1>u(B-$,1?9(B]$,1?M(B\\)?"
60 "[$,1>u(B-$,1?9(B]\\(?:$,1?M(B\\|[$,1?>(B-$,1?M?U?C(B]?\\)?"
61 "\\)")
62 "Regexp matching a composable sequence of Kannada characters.")
63
64;;;###autoload
65(defun kannada-compose-region (from to)
66 (interactive "r")
67 (save-excursion
68 (save-restriction
69 (narrow-to-region from to)
70 (goto-char (point-min))
71 (while (re-search-forward kannada-composable-pattern nil t)
72 (kannada-compose-syllable-region (match-beginning 0)
73 (match-end 0))))))
74;;;###autoload
75(defun kannada-compose-string (string)
76 (with-temp-buffer
77 (insert (decompose-string string))
78 (kannada-compose-region (point-min) (point-max))
79 (buffer-string)))
80
81;;;###autoload
82(defun kannada-post-read-conversion (len)
83 (save-excursion
84 (save-restriction
85 (let ((buffer-modified-p (buffer-modified-p)))
86 (narrow-to-region (point) (+ (point) len))
87 (kannada-compose-region (point-min) (point-max))
88 (set-buffer-modified-p buffer-modified-p)
89 (- (point-max) (point-min))))))
90
91(defun kannada-range (from to)
92 "Make the list of the integers of range FROM to TO."
93 (let (result)
94 (while (<= from to) (setq result (cons to result) to (1- to))) result))
95
96(defun kannada-regexp-of-hashtbl-keys (hashtbl)
97 "Return a regular expression that matches all keys in hashtable HASHTBL."
98 (let ((max-specpdl-size 1000))
99 (regexp-opt
100 (sort
101 (let (dummy)
102 (maphash (function (lambda (key val) (setq dummy (cons key dummy)))) hashtbl)
103 dummy)
104 (function (lambda (x y) (> (length x) (length y))))))))
105
106(defun kannada-regexp-of-hashtbl-vals (hashtbl)
107 "Return a regular expression that matches all values in hashtable HASHTBL."
108 (let ((max-specpdl-size 1000))
109 (regexp-opt
110 (sort
111 (let (dummy)
112 (maphash (function (lambda (key val) (setq dummy (cons val dummy)))) hashtbl)
113 dummy)
114 (function (lambda (x y) (> (length x) (length y))))))))
115
116;;;###autoload
117(defun kannada-composition-function (pos &optional string)
118 "Compose Kannada characters after the position POS.
119If STRING is not nil, it is a string, and POS is an index to the string.
120In this case, compose characters after POS of the string."
121 (if string
122 ;; Not yet implemented.
123 nil
124 (goto-char pos)
125 (if (looking-at kannada-composable-pattern)
126 (prog1 (match-end 0)
127 (kannada-compose-syllable-region pos (match-end 0))))))
128
129;; Notes on conversion steps.
130
131;; 1. chars to glyphs
132;;
133;; Rules will not be applied to the virama appeared at the end of the
134;; text. Also, the preceding/following "r" will be treated as special case.
135
136;; 2. glyphs reordering.
137;;
138;; The glyphs are split by virama, and each glyph groups are
139;; re-ordered in the following order.
140;;
141;; Note that `consonant-glyph' mentioned here does not contain the
142;; vertical bar (right modifier) attached at the right of the
143;; consonant.
144;;
145;; If the glyph-group contains right modifier,
146;; (1) consonant-glyphs/vowels
147;; (2) spacing
148;; (3) right modifier (may be matra)
149;; (4) top matra
150;; (5) preceding "r"
151;; (7) following "r"
152;; (8) bottom matra or virama.
153;;
154;; Otherwise,
155;; (1) consonant-glyph/vowels, with nukta sign
156;; (3) left matra
157;; (4) top matra
158;; (5) preceding "r"
159;; (7) following "r"
160;; (8) bottom matra or virama.
161;; (2) spacing
162
163;; 3. glyph to glyph
164;;
165;; For better display, some glyph display would be tuned.
166
167;; 4. Composition.
168;;
169;; left modifiers will be attached at the left.
170;; others will be attached right.
171
172;; Problem::
173;; Can we generalize this methods to other Indian scripts?
174
175(defvar knd-char-glyph
176 '(("$,1>e(B" . "$,43@(B")
177 ("$,1>f(B" . "$,43A(B")
178 ("$,1?>(B" . "$,44{(B")
179 ("$,1>g(B" . "$,43B(B")
180 ("$,1??(B" . nil)
181 ("$,1>h(B" . "$,43C(B")
182 ("$,1?@(B" . nil)
183 ("$,1>i(B" . "$,43D(B")
184 ("$,1?A(B" . "\$,44(B")
185 ("$,1>j(B" . "$,43E(B")
186 ("$,1?B(B" . "\$,45 (B")
187 ("$,1>k(B" . "$,43F4(B")
188 ("$,1?C(B" . "\$,45$(B")
189 ("$,1?`(B" . "$,43F5 (B")
190 ("$,1?D(B" . "\$,45%(B")
191 ;;("$,1>l(B" . nil) ; not implemented.
192 ;;("$,1?a(B" . nil)
193 ("$,1>n(B" . "$,43G(B")
194 ("$,1>o(B" . "$,43H(B")
195 ("$,1>p(B" . "$,43I(B")
196 ("$,1?F(B" . "\$,45&(B")
197 ("$,1?G(B" . "\$,45&4~(B")
198 ("$,1?H(B" . "\$,45&5'(B")
199 ("$,1>r(B" . "$,43J(B")
200 ("$,1?J(B" . "$,45&5 (B")
201 ("$,1>s(B" . "$,43K(B")
202 ("$,1?K(B" . "\$,45&5 4~(B")
203 ("$,1>t(B" . "$,43L(B")
204 ("$,1?L(B" . "\$,45((B")
205 ("$,1>b(B" . "$,43M(B")
206 ("$,1>c(B" . "$,43N(B")
207 ("$,1>u?M(B" . "$,43O5)(B") ("$,1>u(B" . "$,43O(B") ("$,1>u??(B" . "$,43P(B") ("$,1>u?@(B" . "$,43P4~(B")
208 ("$,1>v?M(B" . "$,43S5)(B") ("$,1>v(B" . "$,43S(B") ("$,1>v??(B" . "$,43T(B") ("$,1>v?@(B" . "$,43T4~(B") ("$,1>v?F(B" . "$,43S5&(B") ("$,1>v?G(B" . "$,43S5&4~(B") ("$,1>v?H(B" . "$,43S5&5'(B") ("$,1>v?J(B" . "$,43S5&5&5 (B") ("$,1>v?K(B" . "$,43S5&5&5 4~(B") ("$,1>v?L(B" . "$,43S5((B")
209 ("$,1>w?M(B" . "$,43V5)(B") ("$,1>w(B" . "$,43V(B") ("$,1>w??(B" . "$,43W(B") ("$,1>w?@(B" . "$,43W4~(B")
210 ("$,1>x?M(B" . "$,43Y5)(B") ("$,1>x(B" . "$,43Y(B") ("$,1>x??(B" . "$,43Z(B") ("$,1>x?@(B" . "$,43Z4~(B")
211 ("$,1>y?M(B" . "$,43\5)(B") ("$,1>y(B" . "$,43\(B")
212 ("$,1>z?M(B" . "$,43^5)(B") ("$,1>z(B" . "$,43^(B") ("$,1>z??(B" . "$,43_(B") ("$,1>z?@(B" . "$,43_4~(B")
213 ("$,1>{?M(B" . "$,43a5)(B") ("$,1>{(B" . "$,43a(B") ("$,1>{??(B" . "$,43b(B") ("$,1>{?@(B" . "$,43b4~(B")
214 ("$,1>|?M(B" . "$,43d5)(B") ("$,1>|(B" . "$,43d(B") ("$,1>|??(B" . "$,43f(B") ("$,1>|?@(B" . "$,43f4~(B") ("$,1>|?F(B" . "$,43e5&(B") ("$,1>|?G(B" . "$,43e5&4~(B") ("$,1>|?H(B" . "$,43e5&5'(B") ("$,1>|?J(B" . "$,43e5&5&5 (B") ("$,1>|?K(B" . "$,43e5&5&5 4~(B") ("$,1>|?L(B" . "$,43e5((B")
215 ("$,1>}?M(B" . "$,44a4z3h45)(B") ("$,1>}(B" . "$,44a4z3h4(B") ("$,1>}??(B" . "$,44b3h4(B") ("$,1>}?@(B" . "$,44b3h44~(B") ("$,1>}?B(B". "$,44a4z3h5 (B") ("$,1>}?J(B". "$,44a5&3h5 (B") ("$,1>}?K(B". "$,44a5&3h5 4~(B")
216 ("$,1>~?M(B" . "$,43j5)(B") ("$,1>~(B" . "$,43j(B")
217 ("$,1>?M(B" . "$,43m5)(B") ("$,1>(B" . "$,43l(B") ("$,1?#?>(B" . "$,43m4{(B") ("$,1>??(B" . "$,43n(B") ("$,1>?@(B" . "$,43n4~(B") ("$,1>?F(B" . "$,43m5&(B") ("$,1>?G(B" . "$,43m5&4~(B") ("$,1>?H(B" . "$,43m5&5'(B") ("$,1>?J(B" . "$,43m5&5&5 (B") ("$,1>?K(B" . "$,43m5&5&5 4~(B") ("$,1>?L(B" . "$,43m5((B")
218 ("$,1? ?M(B" . "$,43p5)(B") ("$,1? (B" . "$,43p(B") ("$,1? ??(B" . "$,43q(B") ("$,1? ?@(B" . "$,43q4~(B")
219 ("$,1?!?M(B" . "$,43s5)(B") ("$,1?!(B" . "$,43s(B") ("$,1?!??(B" . "$,43t(B") ("$,1?!?@(B" . "$,43t4~(B")
220 ("$,1?"?M(B" . "$,43v5)(B") ("$,1?"(B" . "$,43v(B") ("$,1?"??(B" . "$,43w(B") ("$,1?"?@(B" . "$,43w4~(B")
221 ("$,1?#?M(B" . "$,43z5)(B") ("$,1?#(B" . "$,43y(B") ("$,1?#?>(B" . "$,43z4{(B") ("$,1?#??(B" . "$,43{(B") ("$,1?#?@(B" . "$,43{4~(B") ("$,1?#?F(B" . "$,43z5&(B") ("$,1?#?G(B" . "$,43z5&4~(B") ("$,1?#?H(B" . "$,43z5&5'(B") ("$,1?#?J(B" . "$,43z5&5&5 (B") ("$,1?#?K(B" . "$,43z5&5&5 4~(B") ("$,1?#?L(B" . "$,43z5((B")
222 ("$,1?$?M(B" . "$,43}5)(B") ("$,1?$(B" . "$,43}(B") ("$,1?$??(B" . "$,43~(B") ("$,1?$?@(B" . "$,43~4~(B")
223 ("$,1?%?M(B" . "$,44B5)(B") ("$,1?%(B" . "$,44B(B") ("$,1?%??(B" . "$,44C(B") ("$,1?%?@(B" . "$,44C4~(B")
224 ("$,1?&?M(B" . "$,44E5)(B") ("$,1?&(B" . "$,44E(B") ("$,1?&??(B" . "$,44F(B") ("$,1?&?@(B" . "$,44F4~(B")
225 ("$,1?'?M(B" . "$,44H5)(B") ("$,1?'(B" . "$,44H(B") ("$,1?'??(B" . "$,44I(B") ("$,1?'?@(B" . "$,44I4~(B")
226 ("$,1?(?M(B" . "$,44K5)(B") ("$,1?((B" . "$,44K(B") ("$,1?(??(B" . "$,44L(B") ("$,1?(?@(B" . "$,44L4~(B")
227 ("$,1?*?M(B" . "$,44N5)(B") ("$,1?*(B" . "$,44N(B") ("$,1?*??(B" . "$,44O(B") ("$,1?*?@(B" . "$,44O4~(B") ("$,1?*?A(B" . "$,44N5"(B") ("$,1?*?B(B" . "$,44N5#(B") ("$,1?*?J(B" . "$,44N5&5#(B") ("$,1?*?K(B" . "$,44N5&5#4~(B")
228 ("$,1?+?M(B" . "$,44Q5)(B") ("$,1?+(B" . "$,44Q(B") ("$,1?+??(B" . "$,44R(B") ("$,1?+?@(B" . "$,44R4~(B") ("$,1?+?A(B" . "$,44Q5"(B") ("$,1?+?B(B" . "$,44Q5#(B") ("$,1?+?J(B" . "$,44Q5&5#(B") ("$,1?+?K(B" . "$,44Q5&5#4~(B")
229 ("$,1?,?M(B" . "$,44W5)(B") ("$,1?,(B" . "$,44V(B") ("$,1?,?>(B". "$,44W4{(B") ("$,1?,??(B" . "$,44X(B") ("$,1?,?@(B" . "$,44X4~(B") ("$,1?,?F(B" . "$,44W5&(B") ("$,1?,?G(B" . "$,44W5&4~(B") ("$,1?,?H(B" . "$,44W5&5'(B") ("$,1?,?J(B" . "$,44W5&5&5 (B") ("$,1?,?K(B" . "$,44W5&5&5 4~(B") ("$,1?,?L(B" . "$,44W5((B")
230 ("$,1?-?M(B" . "$,44Z5)(B") ("$,1?-(B" . "$,44Z(B") ("$,1?-??(B" . "$,44[(B") ("$,1?-?@(B" . "$,44[4~(B")
231 ("$,1?.?M(B" . "$,44h5!5)(B") ("$,1?.(B" . "$,44h4z4(B") ("$,1?.?>(B" . "$,44h4z5!4{(B") ("$,1?.??(B" . "$,44i4(B") ("$,1?.?@(B" . "$,44i44~(B") ("$,1?.?J(B". "$,44h5&5 (B") ("$,1?.?K(B". "$,44h5&5 4~(B")
232 ("$,1?/?M(B" . "$,44^4z5!5)(B") ("$,1?/(B" . "$,44^4z4(B") ("$,1?/?>(B" . "$,44^4z5!4{(B")("$,1?/??(B" . "$,44_4(B") ("$,1?/?@(B" . "$,44_44~(B") ("$,1?/?J(B" . "$,44^5&5 (B") ("$,1?/?K(B" . "$,44^5&5 4~(B")
233 ("$,1?0?M(B" . "$,44a5)(B") ("$,1?0(B" . "$,44a(B") ("$,1?0??(B" . "$,44b(B") ("$,1?0?@(B" . "$,44b4~(B")
234 ("$,1?0?M(B" . "$,44a5)(B") ("$,1?0(B" . "$,44a(B") ("$,1?0??(B" . "$,44b(B") ("$,1?0?@(B" . "$,44b4~(B")
235 ("$,1?2?M(B" . "$,44e5)(B") ("$,1?2(B" . "$,44d(B") ("$,1?2?>(B" . "$,44e4{(B") ("$,1?2??(B" . "$,44f(B") ("$,1?2?@(B" . "$,44f4~(B") ("$,1?2?F(B" . "$,44e5&(B") ("$,1?2?G(B" . "$,44e5&4~(B") ("$,1?2?H(B" . "$,44e5&5'(B") ("$,1?2?J(B" . "$,44e5&5&5 (B") ("$,1?2?K(B" . "$,44e5&5&5 4~(B") ("$,1?2?L(B" . "$,44e5((B")
236 ("$,1?5?M(B" . "$,44h5)(B") ("$,1?5(B" . "$,44h(B") ("$,1?5??(B" . "$,44i(B") ("$,1?5?@(B" . "$,44i4~(B") ("$,1?5?A(B" . "$,44h5"(B") ("$,1?5?B(B" . "$,44h5#(B") ("$,1?5?J(B" . "$,44h5&5#(B") ("$,1?5?K(B" . "$,44h5&5#4~(B")
237 ("$,1?6?M(B" . "$,44k5)(B") ("$,1?6(B" . "$,44k(B") ("$,1?6??(B" . "$,44l(B") ("$,1?6?@(B" . "$,44l4~(B")
238 ("$,1?7?M(B" . "$,44n5)(B") ("$,1?7(B" . "$,44n(B") ("$,1?7??(B" . "$,44o(B") ("$,1?7?@(B" . "$,44o4~(B")
239 ("$,1?8?M(B" . "$,44q5)(B") ("$,1?8(B" . "$,44q(B") ("$,1?8??(B" . "$,44r(B") ("$,1?8?@(B" . "$,44r4~(B")
240 ("$,1?9?M(B" . "$,44t5)(B") ("$,1?9(B" . "$,44t(B") ("$,1?9??(B" . "$,44u(B") ("$,1?9?@(B" . "$,44u4~(B")
241 ("$,1?3?M(B" . "$,44w5)(B") ("$,1?3(B" . "$,44w(B") ("$,1?3??(B" . "$,44x(B") ("$,1?3?@(B" . "$,44x4~(B"))
242"Kannada characters to glyphs conversion table.
243Default value contains only the basic rules.")
244
245(defvar knd-char-glyph-hash
246 (let* ((hash (make-hash-table :test 'equal)))
247 (mapc (function (lambda (x) (puthash (car x) (cdr x) hash)))
248 knd-char-glyph)
249 hash))
250
251(defvar knd-char-glyph-regexp
252 (kannada-regexp-of-hashtbl-keys knd-char-glyph-hash))
253
254(defvar knd-conjunct-glyph
255 '(("$,1>u(B" . "$,43Q(B") ("$,1>v(B" . "$,43U(B") ("$,1>w(B" . "$,43X(B") ("$,1>x(B" . "$,43[(B") ("$,1>y(B" . "$,43](B")
256 ("$,1>z(B" . "$,43`(B") ("$,1>{(B" . "$,43c(B") ("$,1>|(B" . "$,43g(B") ("$,1>}(B" . "$,43i(B") ("$,1>~(B" . "$,43k(B")
257 ("$,1>(B" . "$,43o(B") ("$,1? (B" . "$,43r(B") ("$,1?!(B" . "$,43u(B") ("$,1?"(B" . "$,43x(B") ("$,1?#(B" . "$,43|(B")
258 ("$,1?$(B" . "$,44A(B") ("$,1?%(B" . "$,44D(B") ("$,1?&(B" . "$,44G(B") ("$,1?'(B" . "$,44J(B") ("$,1?((B" . "$,44M(B")
259 ("$,1?*(B" . "$,44P(B") ("$,1?+(B" . "$,44U(B") ("$,1?,(B" . "$,44Y(B") ("$,1?-(B" . "$,44\(B") ("$,1?.(B" . "$,44](B")
260 ("$,1?/(B" . "$,44`(B") ("$,1?0(B" . "$,44c(B") ("$,1?2(B" . "$,44g(B") ("$,1?3(B" . "$,44y(B") ("$,1?5(B" . "$,44j(B")
261 ("$,1?6(B" . "$,44m(B") ("$,1?7(B" . "$,44p(B") ("$,1?8(B" . "$,44s(B") ("$,1?9(B" . "$,44v(B"))
262"Kannada characters to conjunct glyphs conversion table.")
263
264(defvar knd-conjunct-glyph-hash
265 (let* ((hash (make-hash-table :test 'equal)))
266 (mapc (function (lambda (x) (puthash (car x) (cdr x) hash)))
267 knd-conjunct-glyph)
268 hash))
269
270(defvar knd-conjunct-glyph-regexp
271 (kannada-regexp-of-hashtbl-vals knd-conjunct-glyph-hash))
272
273(mapc
274 (function (lambda (x)
275 (put-char-code-property (aref (cdr x) 0) 'reference-point '(5 . 3))))
276 knd-conjunct-glyph)
277
278;; glyph-to-glyph conversion table.
279;; it is supposed that glyphs are ordered in
280;; [consonant/nukta] - [matra/virama] - [preceding-r] - [anuswar].
281
282(defvar knd-glyph-glyph
283 '(("$,45$4A(B" . "$,45*(B")
284 ("$,45'4A(B" . "$,45+(B")
285 ("$,44A3g(B" . "$,45,(B")
286 ("$,45$3Q(B" . "$,45-(B")))
287
288(defvar knd-glyph-glyph-hash
289 (let* ((hash (make-hash-table :test 'equal)))
290 (mapc (function (lambda (x) (puthash (car x) (cdr x) hash)))
291 knd-glyph-glyph)
292 hash))
293(defvar knd-glyph-glyph-regexp
294 (kannada-regexp-of-hashtbl-keys knd-glyph-glyph-hash))
295
296(defun knd-charseq (from &optional to)
297 (if (null to) (setq to from))
298 (number-sequence (decode-char 'kannada-cdac from)
299 (decode-char 'kannada-cdac to)))
300
301(defvar knd-glyph-cv
302 (append
303 (knd-charseq #x40 #x50)
304 (knd-charseq #x52 #x54)
305 (knd-charseq #x56 #x57)
306 (knd-charseq #x59 #x5a)
307 (knd-charseq #x5c)
308 (knd-charseq #x5e #x5f)
309 (knd-charseq #x61 #x62)
310 (knd-charseq #x64 #x66)
311 (knd-charseq #x6a)
312 (knd-charseq #x6c #x6e)
313 (knd-charseq #x70 #x71)
314 (knd-charseq #x73 #x74)
315 (knd-charseq #x76 #x77)
316 (knd-charseq #x79 #x7b)
317 (knd-charseq #x7d #x7e)
318 (knd-charseq #xa2 #xa3)
319 (knd-charseq #xa5 #xa6)
320 (knd-charseq #xa8 #xa9)
321 (knd-charseq #xab #xac)
322 (knd-charseq #xae #xaf)
323 (knd-charseq #xb1 #xb2)
324 (knd-charseq #xb6 #xb8)
325 (knd-charseq #xb6 #xb8)
326 (knd-charseq #xba #xbb)
327 (knd-charseq #xbe #xbf)
328 (knd-charseq #xc1 #xc2)
329 (knd-charseq #xc4 #xc6)
330 (knd-charseq #xc8 #xc9)
331 (knd-charseq #xcb #xcc)
332 (knd-charseq #xce #xcf)
333 (knd-charseq #xd1 #xd2)
334 (knd-charseq #xd4 #xd5)
335 (knd-charseq #xd7 #xd8)
336 (knd-charseq #xc3))
337 "Kannada Consonants/Vowels/Nukta Glyphs")
338
339(defvar knd-glyph-space
340 (knd-charseq #xb3 #xb4)
341 "Kannada Spacing Glyphs")
342
343(defvar knd-glyph-right-modifier
344 (append
345 (knd-charseq #xdb #xdd)
346 (knd-charseq #xdf)
347 (knd-charseq #xe0 #xe3)
348 (knd-charseq #xe9))
349 "Kannada Modifiers attached at the right side.")
350
351(defvar knd-glyph-right-modifier-regexp
352 (concat "[" knd-glyph-right-modifier "]"))
353
354(defvar knd-glyph-jha-tail
355 (knd-charseq #x68)
356 "Kannada tail for jha.")
357
358(defvar knd-glyph-top-matra
359 (append
360 (knd-charseq #xda)
361 (knd-charseq #xdd)
362 (knd-charseq #xe6)
363 (knd-charseq #xe8))
364 "Kannada Matras attached at the top side.")
365
366(defvar knd-glyph-bottom-matra
367 (append
368 (knd-charseq #xe4 #xe5)
369 (knd-charseq #xe7))
370 "Kannada Matras attached at the bottom.")
371
372(defvar knd-glyph-end-marks
373 (append
374 (knd-charseq #x25)
375 (knd-charseq #x4d #x4e)
376 (knd-charseq #xde))
377 "Kannada end marks: arkavattu, virama, au and diirghaa.")
378
379(defvar knd-glyph-bottom-modifier
380 (append
381 (knd-charseq #x51)
382 (knd-charseq #x55)
383 (knd-charseq #x58)
384 (knd-charseq #x5b)
385 (knd-charseq #x5d)
386 (knd-charseq #x60)
387 (knd-charseq #x63)
388 (knd-charseq #x67)
389 (knd-charseq #x69)
390 (knd-charseq #x6b)
391 (knd-charseq #x6f)
392 (knd-charseq #x72)
393 (knd-charseq #x75)
394 (knd-charseq #x78)
395 (knd-charseq #x7c)
396 (knd-charseq #xa1)
397 (knd-charseq #xa4)
398 (knd-charseq #xa7)
399 (knd-charseq #xaa)
400 (knd-charseq #xad)
401 (knd-charseq #xb0)
402 (knd-charseq #xb5)
403 (knd-charseq #xb9)
404 (knd-charseq #xbc #xbd)
405 (knd-charseq #xc0)
406 (knd-charseq #xc3)
407 (knd-charseq #xc7)
408 (knd-charseq #xca)
409 (knd-charseq #xcd)
410 (knd-charseq #xd0)
411 (knd-charseq #xd3)
412 (knd-charseq #xd6)
413 (knd-charseq #xd9)
414 (knd-charseq #xea #xef))
415 "Kannada Modifiers attached at the bottom.")
416
417(defvar knd-glyph-order
418 `((,knd-glyph-cv . 1)
419 (,knd-glyph-top-matra . 2)
420 (,knd-glyph-jha-tail . 3)
421 (,knd-glyph-right-modifier . 4)
422 (,knd-glyph-space . 5)
423 (,knd-glyph-bottom-modifier . 5)
424 (,knd-glyph-bottom-matra . 6)
425 (,knd-glyph-end-marks . 7)
426 ))
427
428(mapc
429 (function (lambda (x)
430 (mapc
431 (function (lambda (y)
432 (put-char-code-property y 'composition-order (cdr x))))
433 (car x))))
434 knd-glyph-order)
435
436(defun kannada-compose-syllable-string (string)
437 (with-temp-buffer
438 (insert (decompose-string string))
439 (kannada-compose-syllable-region (point-min) (point-max))
440 (buffer-string)))
441
442;; kch
443(defun kannada-compose-syllable-region (from to)
444 "Compose kannada syllable in region FROM to TO."
445 (let ((glyph-str nil) (cons-num 0) (glyph-str-list nil)
446 (last-virama nil) (preceding-r nil) (last-modifier nil)
447 (last-char (char-before to)) match-str pos
448 glyph-block split-pos (conj nil) (rest nil))
449 (save-excursion
450 (save-restriction
451 ;;; *** char-to-glyph conversion ***
452 ;; Special rule 1. -- Last virama must be preserved.
453 (if (eq last-char ?$,1?M(B)
454 (progn
455 (setq last-virama t)
456 (narrow-to-region from (1- to)))
457 (narrow-to-region from to))
458 (goto-char (point-min))
459 ;; Special rule 2. -- preceding "r virama" must be modifier.
460 (when (looking-at "$,1?0?M(B.")
461 (setq preceding-r t)
462 (goto-char (+ 2 (point))))
463 ;; remove conjunct consonants
464 (while (re-search-forward knd-char-glyph-regexp nil t)
465 (setq match-str (match-string 0))
466 (if (and (string-match kannada-consonant match-str)
467 (> cons-num 0))
468 (progn
469 (setq conj (concat conj (gethash (match-string 0 match-str)
470 knd-conjunct-glyph-hash)))
471 (setq match-str (replace-match "" t nil match-str))
472 (if (string-match "$,1?M(B" rest)
473 (setq rest (replace-match "" t nil rest)))))
474 (setq rest (concat rest match-str))
475 ;; count the number of consonant-glyhs.
476 (if (string-match kannada-consonant match-str)
477 (setq cons-num (1+ cons-num))))
478 ;; translate the rest characters into glyphs
479 (setq pos 0)
480 (while (string-match knd-char-glyph-regexp rest pos)
481 (setq match-str (match-string 0 rest))
482 (setq pos (match-end 0))
483 (setq glyph-str
484 (concat glyph-str (gethash match-str knd-char-glyph-hash))))
485
486 (if conj (setq glyph-str (concat glyph-str conj)))
487 (if last-virama (setq glyph-str (concat glyph-str "$,45)(B"))
488 (goto-char (point-min))
489 (if (re-search-forward kannada-consonant-needs-twirl nil t)
490 (progn
491 (setq match-str (match-string 0))
492 (setq glyph-str (concat glyph-str "$,44z(B")))))
493 ;; preceding-r must be attached
494 (if preceding-r
495 (setq glyph-str (concat glyph-str "$,43%(B")))
496 ;;; *** glyph-to-glyph conversion ***
497 (when (string-match knd-glyph-glyph-regexp glyph-str)
498 (setq glyph-str
499 (replace-match (gethash (match-string 0 glyph-str)
500 knd-glyph-glyph-hash)
501 nil t glyph-str)))
502 ;;; *** glyph reordering ***
503 (while (setq split-pos (string-match "$,45)(B\\|.$" glyph-str))
504 (setq glyph-block (substring glyph-str 0 (1+ split-pos)))
505 (setq glyph-str (substring glyph-str (1+ split-pos)))
506 (setq
507 glyph-block
508 (sort (string-to-list glyph-block)
509 (function (lambda (x y)
510 (< (get-char-code-property x 'composition-order)
511 (get-char-code-property y 'composition-order))))))
512 (setq glyph-str-list (nconc glyph-str-list glyph-block)))
513 ;;; *** insert space glyphs for kerning ***
514 (if (> cons-num 0)
515 (let ((curr glyph-str-list) (prev nil) (last-bott nil) bott co)
516 (while curr
517 (setq co (get-char-code-property
518 (car curr) 'composition-order)
519 bott (or (eq co 5) (eq co 6)))
520 (if (and bott last-bott)
521 (setcdr prev (cons ?$,44T(B curr)))
522 (setq last-bott bott prev curr curr (cdr curr)))))
523 ;; concatenate and attach reference-points.
524 (setq glyph-str
525 (cdr
526 (apply
527 'nconc
528 (mapcar
529 (function (lambda (x)
530 (list
531 (or (get-char-code-property x 'reference-point)
532 '(5 . 3) ;; default reference point.
533 )
534 x)))
535 glyph-str-list))))))
536 (compose-region from to glyph-str)))
537
538(provide 'knd-util)
539
540;;; arch-tag: 78d32230-a960-46a5-b622-61ed6ffcf8fc
541;;; knd-util.el ends here
diff --git a/lisp/language/korea-util.el b/lisp/language/korea-util.el
index 9a945668c76..222832022ac 100644
--- a/lisp/language/korea-util.el
+++ b/lisp/language/korea-util.el
@@ -135,4 +135,5 @@
135;; 135;;
136(provide 'korea-util) 136(provide 'korea-util)
137 137
138;;; arch-tag: b17d0981-05da-4577-99f8-1db87fff8b44
138;;; korea-util.el ends here 139;;; korea-util.el ends here
diff --git a/lisp/language/korean.el b/lisp/language/korean.el
index f010de69898..9595ab4ed02 100644
--- a/lisp/language/korean.el
+++ b/lisp/language/korean.el
@@ -73,4 +73,5 @@ The following key bindings are available while using Korean input methods:
73 73
74(provide 'korean) 74(provide 'korean)
75 75
76;;; arch-tag: ca7c7348-5ca3-4623-887a-7fd33d725d0e
76;;; korean.el ends here 77;;; korean.el ends here
diff --git a/lisp/language/lao-util.el b/lisp/language/lao-util.el
index 4db213dab02..ad0253648ea 100644
--- a/lisp/language/lao-util.el
+++ b/lisp/language/lao-util.el
@@ -518,4 +518,5 @@ syllable. In that case, FROM and TO are indexes to STR."
518;; 518;;
519(provide 'lao-util) 519(provide 'lao-util)
520 520
521;;; arch-tag: 1f828781-3cb8-4695-88af-8f33222338ce
521;;; lao-util.el ends here 522;;; lao-util.el ends here
diff --git a/lisp/language/lao.el b/lisp/language/lao.el
index 8edc282a46c..ec5c07342e4 100644
--- a/lisp/language/lao.el
+++ b/lisp/language/lao.el
@@ -53,4 +53,5 @@
53 53
54(provide 'lao) 54(provide 'lao)
55 55
56;;; arch-tag: ba540fd9-6352-4449-a9cd-669afd21fa57
56;;; lao.el ends here 57;;; lao.el ends here
diff --git a/lisp/language/malayalam.el b/lisp/language/malayalam.el
index 27bf122fd7c..4c8fad08fe4 100644
--- a/lisp/language/malayalam.el
+++ b/lisp/language/malayalam.el
@@ -48,4 +48,5 @@ South Indian language Malayalam is supported in this language environment."))
48 48
49(provide 'malayalam) 49(provide 'malayalam)
50 50
51;;; arch-tag: 5f500e53-1e4f-4bb2-aa93-ad8736f0349f
51;;; malayalam.el ends here 52;;; malayalam.el ends here
diff --git a/lisp/language/misc-lang.el b/lisp/language/misc-lang.el
index a4c72742d78..537267ce9ba 100644
--- a/lisp/language/misc-lang.el
+++ b/lisp/language/misc-lang.el
@@ -43,4 +43,5 @@ and Italian.")))
43 43
44(provide 'misc-lang) 44(provide 'misc-lang)
45 45
46;;; arch-tag: 6953585c-1a1a-4c09-be82-a2518afb6074
46;;; misc-lang.el ends here 47;;; misc-lang.el ends here
diff --git a/lisp/language/mlm-util.el b/lisp/language/mlm-util.el
index b492d269ff2..16246aaa2ba 100644
--- a/lisp/language/mlm-util.el
+++ b/lisp/language/mlm-util.el
@@ -74,6 +74,7 @@
74 (malayalam-compose-region (point-min) (point-max)) 74 (malayalam-compose-region (point-min) (point-max))
75 (buffer-string))) 75 (buffer-string)))
76 76
77;;;###autoload
77(defun malayalam-post-read-conversion (len) 78(defun malayalam-post-read-conversion (len)
78 (save-excursion 79 (save-excursion
79 (save-restriction 80 (save-restriction
@@ -409,4 +410,5 @@ In this case, compose characters after POS of the string."
409 410
410(provide 'mlm-util) 411(provide 'mlm-util)
411 412
413;;; arch-tag: 7f25ee67-8f9d-49f2-837b-35c412c00eba
412;;; devan-util.el ends here 414;;; devan-util.el ends here
diff --git a/lisp/language/romanian.el b/lisp/language/romanian.el
index a89a9ab777c..ef7e4cf74c4 100644
--- a/lisp/language/romanian.el
+++ b/lisp/language/romanian.el
@@ -53,4 +53,5 @@ An environment for generic Latin-10 encoding is also available."))
53 53
54(provide 'romanian) 54(provide 'romanian)
55 55
56;;; arch-tag: a0bf93ee-2f02-4678-a477-c08acc35366b
56;;; romanian.el ends here 57;;; romanian.el ends here
diff --git a/lisp/language/slovak.el b/lisp/language/slovak.el
index 42983b72628..308be4286e3 100644
--- a/lisp/language/slovak.el
+++ b/lisp/language/slovak.el
@@ -47,4 +47,5 @@ and selects the Slovak tutorial."))
47 47
48(provide 'slovak) 48(provide 'slovak)
49 49
50;;; arch-tag: 1bae098a-33b2-4426-8c29-59e44fe05484
50;;; slovak.el ends here 51;;; slovak.el ends here
diff --git a/lisp/language/tamil.el b/lisp/language/tamil.el
index 04f3eacc5e5..c62093098e3 100644
--- a/lisp/language/tamil.el
+++ b/lisp/language/tamil.el
@@ -43,4 +43,5 @@ South Indian Language Tamil supported in this language environment."))
43 'tamil-composition-function) 43 'tamil-composition-function)
44(provide 'tamil) 44(provide 'tamil)
45 45
46;;; arch-tag: 2201ac78-7d1e-4674-9bcb-9923c7a2bd9c
46;;; tamil.el ends here 47;;; tamil.el ends here
diff --git a/lisp/language/thai-util.el b/lisp/language/thai-util.el
index 251c1fee5bc..259a102c61e 100644
--- a/lisp/language/thai-util.el
+++ b/lisp/language/thai-util.el
@@ -205,4 +205,5 @@ positions (integers or markers) specifying the region."
205;; 205;;
206(provide 'thai-util) 206(provide 'thai-util)
207 207
208;;; arch-tag: 59425d6a-8cf9-4e06-a6ab-8ab7dc7a7a97
208;;; thai-util.el ends here 209;;; thai-util.el ends here
diff --git a/lisp/language/thai.el b/lisp/language/thai.el
index 0723c3d182b..40bd298aeec 100644
--- a/lisp/language/thai.el
+++ b/lisp/language/thai.el
@@ -80,4 +80,5 @@ This is the same as `thai-tis620' with the addition of no-break-space."
80 80
81(provide 'thai) 81(provide 'thai)
82 82
83;;; arch-tag: c7eb0e91-4db0-4619-81f8-8762e7d51e15
83;;; thai.el ends here 84;;; thai.el ends here
diff --git a/lisp/language/tibet-util.el b/lisp/language/tibet-util.el
index 260cf7efe54..ec53d121f02 100644
--- a/lisp/language/tibet-util.el
+++ b/lisp/language/tibet-util.el
@@ -434,4 +434,5 @@ before writing buffer in Unicode. See also
434 434
435(provide 'tibet-util) 435(provide 'tibet-util)
436 436
437;;; arch-tag: 7a7333e8-1584-446c-b39c-a02b9def265d
437;;; tibet-util.el ends here 438;;; tibet-util.el ends here
diff --git a/lisp/language/tibetan.el b/lisp/language/tibetan.el
index ab9516f73d1..4b580f4a81c 100644
--- a/lisp/language/tibetan.el
+++ b/lisp/language/tibetan.el
@@ -613,4 +613,5 @@ This also matches some punctuation characters which need conversion.")
613 613
614(provide 'tibetan) 614(provide 'tibetan)
615 615
616;;; arch-tag: 8d37c8d7-f95d-450f-9ec2-819e61fc79a7
616;;; tibetan.el ends here 617;;; tibetan.el ends here
diff --git a/lisp/language/tml-util.el b/lisp/language/tml-util.el
index 34c18741e97..e9670e3d1a6 100644
--- a/lisp/language/tml-util.el
+++ b/lisp/language/tml-util.el
@@ -76,6 +76,7 @@
76 (tamil-compose-region (point-min) (point-max)) 76 (tamil-compose-region (point-min) (point-max))
77 (buffer-string))) 77 (buffer-string)))
78 78
79;;;###autoload
79(defun tamil-post-read-conversion (len) 80(defun tamil-post-read-conversion (len)
80 (save-excursion 81 (save-excursion
81 (save-restriction 82 (save-restriction
@@ -368,4 +369,5 @@ In this case, compose characters after POS of the string."
368 369
369(provide 'tml-util) 370(provide 'tml-util)
370 371
372;;; arch-tag: 4d1c9737-e7b1-44cf-a040-4f64c50e773e
371;;; tml-util.el ends here 373;;; tml-util.el ends here
diff --git a/lisp/language/utf-8-lang.el b/lisp/language/utf-8-lang.el
index 3aa845921ad..70475846dbb 100644
--- a/lisp/language/utf-8-lang.el
+++ b/lisp/language/utf-8-lang.el
@@ -51,4 +51,6 @@ encoded in UTF-8."))
51 nil) 51 nil)
52 52
53(provide 'utf-8-lang) 53(provide 'utf-8-lang)
54
55;;; arch-tag: dfa339e1-296f-4b1e-9fe8-2b65279ec813
54;;; utf-8-lang.el ends here 56;;; utf-8-lang.el ends here
diff --git a/lisp/language/viet-util.el b/lisp/language/viet-util.el
index 04c26f14756..c2f1218a536 100644
--- a/lisp/language/viet-util.el
+++ b/lisp/language/viet-util.el
@@ -292,4 +292,5 @@ positions (integers or markers) specifying the stretch of the region."
292;;; 292;;;
293(provide 'viet-util) 293(provide 'viet-util)
294 294
295;;; arch-tag: 082a4d3b-168f-45b4-b3e1-82bfa1b5a194
295;;; viet-util.el ends here 296;;; viet-util.el ends here
diff --git a/lisp/language/vietnamese.el b/lisp/language/vietnamese.el
index 8f403f112e0..a5360d781f5 100644
--- a/lisp/language/vietnamese.el
+++ b/lisp/language/vietnamese.el
@@ -105,4 +105,5 @@ Telex, VIQR is the default setting.")))
105 105
106(provide 'vietnamese) 106(provide 'vietnamese)
107 107
108;;; arch-tag: 5bd4f1aa-2d4e-4f33-b7d8-0679c6a19ee6
108;;; vietnamese.el ends here 109;;; vietnamese.el ends here