Commit 3ff3655c authored by Kenichi Handa's avatar Kenichi Handa
Browse files

(indian-compose-regexp): New function.

(malayalam-composable-pattern): Fix the pattern.
(composition-function-table): Set malayalam-composable-pattern for
Malayalam characters.
parent d0db2ec8
2009-12-12 Kenichi Handa <handa@m17n.org>
* language/indian.el (indian-compose-regexp): New function.
(malayalam-composable-pattern): Fix the pattern.
(composition-function-table): Set malayalam-composable-pattern for
Malayalam characters.
2009-12-11 Chong Yidong <cyd@stupidchicken.com>
* progmodes/bug-reference.el (bug-reference-map): Bind mouse-2
......
......@@ -129,6 +129,15 @@ environment."))
South Indian language Malayalam is supported in this language environment."))
'("Indian"))
;; Replace mnemonic characters in REGEXP according to TABLE. TABLE is
;; an alist of (MNEMONIC-STRING . REPLACEMENT-STRING).
(defun indian-compose-regexp (regexp table)
(let ((case-fold-search nil))
(dolist (elt table)
(setq regexp (replace-regexp-in-string (car elt) (cdr elt) regexp t t)))
regexp))
(defconst devanagari-composable-pattern
(concat
"\\([-औॠॡ][ँं]?\\)\\|[ः।]"
......@@ -156,12 +165,27 @@ South Indian language Malayalam is supported in this language environment."))
"Regexp matching a composable sequence of Kannada characters.")
(defconst malayalam-composable-pattern
(concat
"\\([-][]?\\)\\|ഃ"
"\\|\\("
"\\(?:\\(?:[-]\\)?\\(?:[-]\\)?\\(?:[-]\\)?[-]\\)?"
"[-]\\(?:\\|[-ൃെേൈൊൊോൌ]?[ം്]?\\)?"
"\\)")
(let ((table '(("V" . "[\u0D05-\u0D14\u0D60-\u0D61]") ; independent vowel
("C" . "[\u0D15-\u0D39]") ; consonant
("m" . "[\u0D46-\u0D48\u0D4A-\u0D4C]") ; prebase matra
("p" . "[\u0D3E-\u0D44\u0D57]") ; postname matra
("b" . "[\u0D62-\u0D63]") ; belowbase matra
("a" . "[\u0D02-\u0D03]") ; abovebase sign
("H" . "") ; virama sign
("N" . "\u200D") ; ZWJ
("J" . "\u200C") ; ZWNJ
("X" . "[\u0D00-\u0D7F]")))) ; all coverage
(indian-compose-regexp
(concat
;; consonant-based syllables
"\\(CJ?HJ?\\)*C\\(H[NJ]?\\|m?b?p?a?\\)\\|"
;; syllables with an independent vowel
"V\\(J?HC\\)?m?b?p?n?a?\\|"
;; special consonant form
"JHC\\|"
;; any other singleton characters
"X")
table))
"Regexp matching a composable sequence of Malayalam characters.")
(let ((script-regexp-alist
......@@ -173,7 +197,7 @@ South Indian language Malayalam is supported in this language environment."))
(tamil . "[\xB80-\xBFF\x200C\x200D]+")
(telugu . "[\xC00-\xC7F\x200C\x200D]+")
(kannada . "[\xC80-\xCFF\x200C\x200D]+")
(malayalam . "[\xD00-\xD7F\x200C\x200D]+"))))
(malayalam . ,malayalam-composable-pattern))))
(map-char-table
#'(lambda (key val)
(let ((slot (assq val script-regexp-alist)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment