diff options
| author | Kenichi Handa | 2005-03-28 07:31:49 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2005-03-28 07:31:49 +0000 |
| commit | e8d0ae6b0b835d73ae5b4318381dbfe90d263efb (patch) | |
| tree | 557d04b97dd84ba737a472b39abf55ae86584659 | |
| parent | 4970773706e1c006c071d1e76044571e7f5c8875 (diff) | |
| download | emacs-e8d0ae6b0b835d73ae5b4318381dbfe90d263efb.tar.gz emacs-e8d0ae6b0b835d73ae5b4318381dbfe90d263efb.zip | |
Sync with the main trunk.
| -rw-r--r-- | lisp/language/thai-util.el | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/lisp/language/thai-util.el b/lisp/language/thai-util.el index b39fadf9567..0957748799d 100644 --- a/lisp/language/thai-util.el +++ b/lisp/language/thai-util.el | |||
| @@ -172,20 +172,17 @@ if necessary." | |||
| 172 | (global-set-key (vector char) 'thai-self-insert-command)) | 172 | (global-set-key (vector char) 'thai-self-insert-command)) |
| 173 | ((memq ptype '(vowel-upper vowel-lower)) | 173 | ((memq ptype '(vowel-upper vowel-lower)) |
| 174 | (modify-category-entry char ?v thai-category-table) | 174 | (modify-category-entry char ?v thai-category-table) |
| 175 | (if (or (= char ?,TT(B) (= char ?$,1C4(B)) | 175 | (if (= char ?,TT(B) |
| 176 | ;; Give category `I' to "SARA I". | 176 | ;; Give category `I' to "SARA I". |
| 177 | (modify-category-entry char ?I thai-category-table)) | 177 | (modify-category-entry char ?I thai-category-table))) |
| 178 | (global-set-key (vector char) 'thai-self-insert-command)) | ||
| 179 | ((eq ptype 'tone) | 178 | ((eq ptype 'tone) |
| 180 | (modify-category-entry char ?t thai-category-table) | 179 | (modify-category-entry char ?t thai-category-table) |
| 181 | (modify-category-entry char ?u thai-category-table) | 180 | (modify-category-entry char ?u thai-category-table)) |
| 182 | (global-set-key (vector char) 'thai-self-insert-command)) | ||
| 183 | ((eq ptype 'sign-upper) | 181 | ((eq ptype 'sign-upper) |
| 184 | (modify-category-entry char ?u thai-category-table) | 182 | (modify-category-entry char ?u thai-category-table) |
| 185 | (if (or (= char ?,Tl(B) (= char ?$,1CL(B)) | 183 | (if (= char ?,Tl(B) |
| 186 | ;; Give category `U' to "THANTHAKHAT". | 184 | ;; Give category `U' to "THANTHAKHAT". |
| 187 | (modify-category-entry char ?U thai-category-table)) | 185 | (modify-category-entry char ?U thai-category-table)))) |
| 188 | (global-set-key (vector char) 'thai-self-insert-command))) | ||
| 189 | (put-char-code-property char 'name (nth 2 elm))))) | 186 | (put-char-code-property char 'name (nth 2 elm))))) |
| 190 | 187 | ||
| 191 | (defun thai-compose-syllable (beg end &optional category-set string) | 188 | (defun thai-compose-syllable (beg end &optional category-set string) |
| @@ -243,18 +240,18 @@ positions (integers or markers) specifying the region." | |||
| 243 | ;;;###autoload | 240 | ;;;###autoload |
| 244 | (defun thai-composition-function (pos &optional string) | 241 | (defun thai-composition-function (pos &optional string) |
| 245 | (setq pos (1- pos)) | 242 | (setq pos (1- pos)) |
| 246 | (let ((pattern "[,T!(B-,TCEG(B-,TN!(B-,TCEG(B-,TN(B][,TQT(B-,TWgnX(B-,TZQT(B-,TWgnX(B-,TZ(B]?[,Th(B-,Tmh(B-,Tm(B]?")) | 243 | (with-category-table thai-category-table |
| 247 | (if string | 244 | (if string |
| 248 | (if (and (>= pos 0) | 245 | (if (and (>= pos 0) |
| 249 | (eq (string-match pattern string pos) pos)) | 246 | (eq (string-match thai-composition-pattern string pos) pos)) |
| 250 | (prog1 (match-end 0) | 247 | (prog1 (match-end 0) |
| 251 | (compose-string string pos (match-end 0)))) | 248 | (thai-compose-syllable pos (match-end 0) nil string))) |
| 252 | (if (>= pos (point-min)) | 249 | (if (>= pos (point-min)) |
| 253 | (progn | 250 | (progn |
| 254 | (goto-char pos) | 251 | (goto-char pos) |
| 255 | (if (looking-at pattern) | 252 | (if (looking-at thai-composition-pattern) |
| 256 | (prog1 (match-end 0) | 253 | (prog1 (match-end 0) |
| 257 | (compose-region pos (match-end 0))))))))) | 254 | (thai-compose-syllable pos (match-end 0))))))))) |
| 258 | 255 | ||
| 259 | ;; | 256 | ;; |
| 260 | (provide 'thai-util) | 257 | (provide 'thai-util) |