-;;; thai-xtis.el --- Thai support for pre-composed font (for XTIS).
+;;; thai-xtis.el --- Thai support for pre-composed representation (XTIS).
;; Copyright (C) 1999 Electrotechnical Laboratory, JAPAN.
;; Licensed to the Free Software Foundation.
;;; Code:
(when (featurep 'xemacs)
- (make-charset 'thai-xtis "Precomposed Thai (XTIS by Virach)."
- '(registry "xtis-0"
- dimension 2
- columns 1
- chars 94
- final ??
- graphic 0))
-
- (modify-syntax-entry 'thai-xtis "w")
-
- (define-category ?T "Precomposed Thai character.")
- (modify-category-entry 'thai-xtis ?T)
+ (let ((deflist '(;; chars syntax
+ ("\e$(?!0\e(B-\e$(?NxP0R0S0`0\e(B-\e$(?e0\e(B" "w")
+ ("\e$(?p0\e(B-\e$(?y0\e(B" "w")
+ ("\e$(?O0f0_0o0z0{0\e(B" "_")
+ ))
+ elm chars len syntax category to ch i)
+ (while deflist
+ (setq elm (car deflist))
+ (setq chars (car elm)
+ len (length chars)
+ syntax (nth 1 elm)
+ i 0)
+ (while (< i len)
+ (if (= (aref chars i) ?-)
+ (setq i (1+ i)
+ to (nth 1 (split-char (aref chars i))))
+ (setq ch (nth 1 (split-char (aref chars i)))
+ to ch))
+ (while (<= ch to)
+ (modify-syntax-entry (vector 'thai-xtis ch) syntax)
+ (setq ch (1+ ch)))
+ (setq i (1+ i)))
+ (setq deflist (cdr deflist))))
+
+ (put-charset-property 'thai-xtis 'preferred-coding-system 'tis-620)
)
;; This is the ccl-decode-thai-xtis automaton.