58 |
"\\)") |
"\\)") |
59 |
"Regexp matching a composable sequence of Devanagari characters.") |
"Regexp matching a composable sequence of Devanagari characters.") |
60 |
|
|
61 |
|
(dolist (range '((#x0903 . #x0903) |
62 |
|
(#x0905 . #x0939) |
63 |
|
(#x0958 . #x0961))) |
64 |
|
(set-char-table-range indian-composable-pattern range |
65 |
|
devanagari-composable-pattern)) |
66 |
|
|
67 |
;;;###autoload |
;;;###autoload |
68 |
(defun devanagari-compose-region (from to) |
(defun devanagari-compose-region (from to) |
69 |
(interactive "r") |
(interactive "r") |
104 |
dummy) |
dummy) |
105 |
(function (lambda (x y) (> (length x) (length y)))))))) |
(function (lambda (x y) (> (length x) (length y)))))))) |
106 |
|
|
107 |
(defun devanagari-composition-function (from to pattern &optional string) |
|
108 |
"Compose Devanagari characters in REGION, or STRING if specified. |
;;;###autoload |
109 |
Assume that the REGION or STRING must fully match the composable |
(defun devanagari-composition-function (pos &optional string) |
110 |
PATTERN regexp." |
"Compose Devanagari characters after the position POS. |
111 |
(if string (devanagari-compose-syllable-string string) |
If STRING is not nil, it is a string, and POS is an index to the string. |
112 |
(devanagari-compose-syllable-region from to)) |
In this case, compose characters after POS of the string." |
113 |
(- to from)) |
(if string |
114 |
|
;; Not yet implemented. |
115 |
;; Register a function to compose Devanagari characters. |
nil |
116 |
(mapc |
(goto-char pos) |
117 |
(function (lambda (ucs) |
(if (looking-at devanagari-composable-pattern) |
118 |
(aset composition-function-table ucs |
(prog1 (match-end 0) |
119 |
(list (cons devanagari-composable-pattern |
(devanagari-compose-syllable-region pos (match-end 0)))))) |
|
'devanagari-composition-function))))) |
|
|
(nconc '(#x0903) (devanagari-range #x0905 #x0939) (devanagari-range #x0958 #x0961))) |
|
120 |
|
|
121 |
;; Notes on conversion steps. |
;; Notes on conversion steps. |
122 |
|
|