comparison lisp/language/lao-util.el @ 89300:6a0cc62928b5

(lao-post-read-conversion): Delete this function. (lao-composition-function): Change arguments to conform to composition-function-table.
author Kenichi Handa <handa@m17n.org>
date Thu, 07 Nov 2002 06:31:37 +0000
parents 0eccf1b3ae81
children 2f877ed80fa6
comparison
equal deleted inserted replaced
89299:a89011cf0b79 89300:6a0cc62928b5
153 ;; T 153 ;; T
154 ;; V T V T 154 ;; V T V T
155 ;; CV -> C, CT -> C, CVT -> C, Cv -> C, CvT -> C 155 ;; CV -> C, CT -> C, CVT -> C, Cv -> C, CvT -> C
156 ;; v v 156 ;; v v
157 ;; T 157 ;; T
158 ;; V T V T 158 ;; V T V T
159 ;; CsV -> C, CsT -> C, CsVT -> C, Csv -> C, CvT -> C 159 ;; CsV -> C, CsT -> C, CsVT -> C, Csv -> C, CsvT -> C
160 ;; s s s s s 160 ;; s s s s s
161 ;; v v 161 ;; v v
162 162
163 163
164 ;; where C: consonant, V: vowel upper, v: vowel lower, 164 ;; where C: consonant, V: vowel upper, v: vowel lower,
165 ;; T: tone mark, s: semivowel lower 165 ;; T: tone mark, s: semivowel lower
166 166
517 (if (< from to) 517 (if (< from to)
518 (concat lao-str (substring str from to)) 518 (concat lao-str (substring str from to))
519 lao-str))) 519 lao-str)))
520 520
521 ;;;###autoload 521 ;;;###autoload
522 (defun lao-post-read-conversion (len) 522 (defun lao-composition-function (pos &optional string)
523 (lao-compose-region (point) (+ (point) len)) 523 (setq pos (1- pos))
524 len) 524 (with-category-table lao-category-table
525 525 (if string
526 ;;;###autoload 526 (if (and (>= pos 0)
527 (defun lao-composition-function (from to pattern &optional string) 527 (eq (string-match lao-composition-pattern string pos) pos))
528 "Compose Lao text in the region FROM and TO. 528 (prog1 (match-end 0)
529 The text matches the regular expression PATTERN. 529 (compose-string string pos (match-end 0))))
530 Optional 4th argument STRING, if non-nil, is a string containing text 530 (if (>= pos (point-min))
531 to compose. 531 (save-excursion
532 532 (goto-char pos)
533 The return value is number of composed characters." 533 (if (looking-at lao-composition-pattern)
534 (if (< (1+ from) to) 534 (prog1 (match-end 0)
535 (prog1 (- to from) 535 (compose-region pos (match-end 0)))))))))
536 (if string
537 (compose-string string from to)
538 (compose-region from to))
539 (- to from))))
540 536
541 ;;;###autoload 537 ;;;###autoload
542 (defun lao-compose-region (from to) 538 (defun lao-compose-region (from to)
543 (interactive "r") 539 (interactive "r")
544 (save-restriction 540 (save-restriction