comparison lisp/language/tibet-util.el @ 89304:5b82d8f14d06

(tibetan-composition-function): Change arguments to conform to composition-function-table.
author Kenichi Handa <handa@m17n.org>
date Thu, 07 Nov 2002 06:33:13 +0000
parents df6b9860f119
children 2f877ed80fa6
comparison
equal deleted inserted replaced
89303:cba12d896f41 89304:5b82d8f14d06
118 ;;; (Sanskrit visarga, though it is a vowel modifier, is considered 118 ;;; (Sanskrit visarga, though it is a vowel modifier, is considered
119 ;;; to be a punctuation.) 119 ;;; to be a punctuation.)
120 ;;; 120 ;;;
121 ;;; Here are examples of the words "bsgrubs" and "hfauM" 121 ;;; Here are examples of the words "bsgrubs" and "hfauM"
122 ;;; 122 ;;;
123 ;;; 4$(7"70"714%qx!"U0"G###C"U14"70"714"G0"G1(B 4$(7"Hx!"Rx!"Ur'"_0"H"R"U"_1(B 123 ;;; $(7"7"G###C"U"7"G(B $(7"H"R"U"_(B
124 ;;; 124 ;;;
125 ;;; M 125 ;;; M
126 ;;; b s b s h 126 ;;; b s b s h
127 ;;; g fa 127 ;;; g fa
128 ;;; r u 128 ;;; r u
144 rule comp-vowel tmp) 144 rule comp-vowel tmp)
145 ;; Special treatment for 'a chung. 145 ;; Special treatment for 'a chung.
146 ;; If 'a follows a consonant, turn it into the subjoined form. 146 ;; If 'a follows a consonant, turn it into the subjoined form.
147 ;; * Disabled by Tomabechi 2000/06/09 * 147 ;; * Disabled by Tomabechi 2000/06/09 *
148 ;; Because in Unicode, $(7"A(B may follow directly a consonant without 148 ;; Because in Unicode, $(7"A(B may follow directly a consonant without
149 ;; any intervening vowel, as in 4$(7"90"914""0"""Q14"A0"A1!;(B=4$(7"90"91(B 4$(7""0""1(B 4$(7"A0"A1(B not 4$(7"90"91(B 4$(7""0""1(B $(7"Q(B 4$(7"A0"A1(B 149 ;; any intervening vowel, as in $(7"9"""Q"A!;(B=$(7"9(B $(7""(B $(7"A(B not $(7"9(B $(7""(B $(7"Q(B $(7"A(B
150 ;;(if (and (= char ?$(7"A(B) 150 ;;(if (and (= char ?$(7"A(B)
151 ;; (aref (char-category-set (car last)) ?0)) 151 ;; (aref (char-category-set (car last)) ?0))
152 ;; (setq char ?$(7"R(B)) ;; modified for new font by Tomabechi 1999/12/10 152 ;; (setq char ?$(7"R(B)) ;; modified for new font by Tomabechi 1999/12/10
153 153
154 ;; Composite vowel signs are decomposed before being added 154 ;; Composite vowel signs are decomposed before being added
292 new (concat new (if slot (cdr slot) (char-to-string char))) 292 new (concat new (if slot (cdr slot) (char-to-string char)))
293 idx (1+ idx))) 293 idx (1+ idx)))
294 new)) 294 new))
295 295
296 ;;;###autoload 296 ;;;###autoload
297 (defun tibetan-composition-function (from to pattern &optional string) 297 (defun tibetan-composition-function (pos &optional string)
298 (setq pos (1- pos))
298 (if string 299 (if string
299 (tibetan-compose-string string) 300 ;; Not yet implemented.
300 (tibetan-compose-region from to)) 301 nil
301 (- to from)) 302 (if (>= pos (point-min))
303 (save-excursion
304 (goto-char pos)
305 (if (looking-at tibetan-composable-pattern)
306 (prog1 (match-end 0)
307 (tibetan-compose-region pos (match-end 0))))))))
302 308
303 ;;; 309 ;;;
304 ;;; This variable is used to avoid repeated decomposition. 310 ;;; This variable is used to avoid repeated decomposition.
305 ;;; 311 ;;;
306 (setq-default tibetan-decomposed nil) 312 (setq-default tibetan-decomposed nil)