(features thai-util)
(sample-text
. (thai-compose-string
- (copy-sequence "Thai (\e,T@RIRd7B\e(B) \e,TJ\e0GQ\e1J\e04U\e1$\e0CQ\e1:\e(B, \e,TJ\e0GQ\e1J\e04U\e1\e0$h\e1P\e(B")))
+ (copy-sequence "Thai (\e,T@RIRd7B\e(B) \e,TJGQJ4U$CQ:\e(B, \e,TJGQJ4U$hP\e(B")))
(documentation . t)))
-;; Register a function to compose Thai characters.
-(set-char-table-range composition-function-table
- '(#x0E00 . #x0E7F)
- '(("\\c0\\c4\\|\\c0\\(\\c2\\|\\c3\\)\\c4?"
- . thai-composition-function)))
-
(define-coding-system 'cp874
"DOS codepage 874 (Thai)"
:coding-type 'charset
:mime-charset 'iso-8859-11 ; not actually registered as of 2002-05-24
:charset-list '(iso-8859-11))
+;; For automatic composition.
+(let ((chars "\e,TQTUVWXYZghijklmn\e(B"))
+ (dotimes (i (length chars))
+ (aset composition-function-table (aref chars i)
+ 'thai-composition-function)))
+
(provide 'thai)
;;; thai.el ends here