;;; its/thai.el --- Inputting Thai characters in Egg Input Method Architecture
-;; Copyright (C) 1998 Mule Project,
+;; Copyright (C) 1997, 1998 Mule Project,
;; Powered by Electrotechnical Laboratory, JAPAN.
;; Project Leader: Satoru Tomura <tomura@etl.go.jp>
list))))
`(let (consonant vowel tone)
,@list
- (its-define-thai-composit consonant vowel tone))))
+ (its-thai-composit consonant vowel tone))))
- (defun its-define-thai-composit (consonant vowel tone)
- (let (pair state)
+ (defun its-thai-composit (consonant vowel tone)
+ (let (keyseq output)
(while consonant
- (setq pair (car consonant)
+ (setq keyseq (car (car consonant))
+ output (cdr (car consonant))
consonant (cdr consonant))
- (setq state (its-goto-state (car pair)))
- (its-make-next-state state -1 (aref (cdr pair) 0) (cdr pair))
- (its-define-thai-add-vowel state (car pair) (cdr pair) vowel tone)
- (its-define-thai-add-tone state (car pair) (cdr pair) tone)
- (its-defrule-otherwise state (cdr pair)))))
-
- (defun its-define-thai-add-vowel (state keyseq output vowel tone)
- (let (next-state next-key next-keyseq next-output composed-output)
+ (its-thai-add-vowel keyseq output vowel tone)
+ (its-thai-add-tone keyseq output tone))))
+
+ (defun its-thai-add-vowel (keyseq output vowel tone)
+ (let (next-keyseq next-output)
(while vowel
- (setq next-key (car (car vowel))
- next-keyseq (concat keyseq next-key)
+ (setq next-keyseq (concat keyseq (car (car vowel)))
next-output (concat output (cdr (car vowel)))
- composed-output (compose-string next-output)
vowel (cdr vowel))
- (setq next-state (its-make-next-state state
- (aref next-key 0)
- next-keyseq
- composed-output))
- (its-make-next-state next-state -1 next-keyseq composed-output)
- (its-define-thai-add-tone next-state next-keyseq next-output tone)
- (its-defrule-otherwise next-state composed-output))))
-
- (defun its-define-thai-add-tone (state keyseq output tone)
- (let (next-state next-key next-keyseq next-output composed-output)
+ (its-defrule next-keyseq (compose-string next-output))
+ (its-thai-add-tone next-keyseq next-output tone))))
+
+ (defun its-thai-add-tone (keyseq output tone)
+ (let (next-keyseq next-output)
(while tone
- (setq next-key (car (car tone))
- next-keyseq (concat keyseq next-key)
+ (setq next-keyseq (concat keyseq (car (car tone)))
next-output (concat output (cdr (car tone)))
- composed-output (compose-string next-output)
- tone (cdr tone))
- (setq next-state (its-make-next-state state
- (aref next-key 0)
- next-keyseq
- composed-output))))))
+ tone (cdr tone))
+ (its-defrule next-keyseq (compose-string next-output))))))
;; Thai Kesmanee keyboard support.
(define-its-state-machine its-thai-kesmanee-map
- "kesmanee" "\e,T!!\e(B" 'Thai
+ "kesmanee" "\e,T!!\e(B" Thai
"Map for Thai Kesmanee input method with TIS620 keyboard. (Thai)"
(define-its-thai-keymap