(macro
(handle-mark
- (delete @-)
;; At first, cancel the tone mark if already put.
(move T) (select 0)
(move M)
;; The state shifted to when a vowel is typed.
(after-v
(consonant (shift after-vc))
- (vowel (mark M) (set V-3 V-2) (set V-2 V-1) (set V-1 @-1))
+ (vowel (mark M) (set V-3 V-2) (set V-2 V-1) (set V-1 @-1)
+ (move T) (select 0) (handle-mark) (move M))
(consonant-or-tone-mark (delete @-) (pushback 1) (shift after-t))
(backspace (delete @-)
(cond (V-3 (set V-1 V-2) (set V-2 V-3) (set V-3 0))
(t (set CURRENT-SELECT -1))
(tone-mark (cond ((= CURRENT-SELECT SELECT) (move T) (select 0) (move @>)
(shift temporary-escape))
- (1 (handle-mark) (set CURRENT-SELECT SELECT))))
+ (1 (delete @-) (handle-mark) (set CURRENT-SELECT SELECT))))
(nil (cond (C-AFTER-V (shift after-vc))
(1 (shift after-v)))))