Function: tai-viet-compose-region
tai-viet-compose-region is a byte-compiled function defined in
tv-util.el.gz.
Signature
(tai-viet-compose-region FROM TO)
Documentation
Compose Tai Viet characters in the region between FROM and TO.
Source Code
;; Defined in /usr/src/emacs/lisp/language/tv-util.el.gz
(defun tai-viet-compose-region (from to)
"Compose Tai Viet characters in the region between FROM and TO."
(decompose-region from to)
(let ((normal-rule '(Br . Bl))
(tone-rule '(tr . bl))
(prev-viet nil)
ch info pos components overhang)
(while (< from to)
(or ch
(setq ch (char-after from)
info (aref tai-viet-glyph-info ch)))
(setq from (1+ from))
(if (not info)
(setq prev-viet nil
ch nil)
(if (memq info '(combining-vowel combining-tone))
(progn
;; Display this as a spacing glyph.
(compose-region (1- from) from (string ?\t ch))
(setq prev-viet t
ch nil))
(setq pos (1- from)
components ch
overhang (if (eq info 'right-overhang)
'right-overhang
(if (and (not prev-viet) (eq info 'left-overhang))
'left-overhang))
prev-viet t
ch nil)
(if (and (< from to)
(setq ch (char-after from)
info (aref tai-viet-glyph-info ch)))
(if (memq info '(combining-vowel combining-tone))
(progn
(setq components
(list components normal-rule ch)
from (1+ from)
ch nil)
(if (and (< from to)
(setq ch (char-after from)
info (aref tai-viet-glyph-info ch))
(eq info 'combining-tone))
(setq components (nconc components
(list tone-rule ch))
from (1+ from)))
(if (eq overhang 'left-overhang)
(setq components (cons ?\t
(cons normal-rule components)))
(if (and (eq overhang 'right-overhang)
(>= from to))
(setq components (nconc components
(list normal-rule ?\t)))))
(compose-region pos from components))
(if (eq overhang 'left-overhang)
(compose-region pos from (string ?\t components))))
(if (eq overhang 'left-overhang)
(compose-region pos from (string ?\t components))
(if (and (eq overhang 'right-overhang) (>= from to))
(compose-region pos from (string components ?\t))))))))
from))