diff options
| author | Kenichi Handa | 2002-11-07 06:32:26 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2002-11-07 06:32:26 +0000 |
| commit | ed01146036acc018eb62e5e41e6ab34b44853a7e (patch) | |
| tree | 676616012f759cc03a2c8ca1477793fdac6515e2 | |
| parent | 1662e139884f13ba1f5218749b2c493fc0117295 (diff) | |
| download | emacs-ed01146036acc018eb62e5e41e6ab34b44853a7e.tar.gz emacs-ed01146036acc018eb62e5e41e6ab34b44853a7e.zip | |
(thai-post-read-conversion): Delete this
function.
(thai-composition-function): Change arguments to conform to
composition-function-table.
| -rw-r--r-- | lisp/language/thai-util.el | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/lisp/language/thai-util.el b/lisp/language/thai-util.el index eaae6601c7d..734ea4de5f3 100644 --- a/lisp/language/thai-util.el +++ b/lisp/language/thai-util.el | |||
| @@ -185,24 +185,20 @@ positions (integers or markers) specifying the region." | |||
| 185 | (thai-compose-region (point-min) (point-max))) | 185 | (thai-compose-region (point-min) (point-max))) |
| 186 | 186 | ||
| 187 | ;;;###autoload | 187 | ;;;###autoload |
| 188 | (defun thai-post-read-conversion (len) | 188 | (defun thai-composition-function (pos &optional string) |
| 189 | (thai-compose-region (point) (+ (point) len)) | 189 | (setq pos (1- pos)) |
| 190 | len) | 190 | (let ((pattern "[,T!(B-,TCEG(B-,TN!(B-,TCEG(B-,TN(B][,TQT(B-,TWgnX(B-,TZQT(B-,TWgnX(B-,TZ(B]?[,Th(B-,Tmh(B-,Tm(B]?")) |
| 191 | 191 | (if string | |
| 192 | ;;;###autoload | 192 | (if (and (>= pos 0) |
| 193 | (defun thai-composition-function (from to pattern &optional string) | 193 | (eq (string-match pattern string pos) pos)) |
| 194 | "Compose Thai text in the region FROM and TO. | 194 | (prog1 (match-end 0) |
| 195 | The text matches the regular expression PATTERN. | 195 | (compose-string string pos (match-end 0)))) |
| 196 | Optional 4th argument STRING, if non-nil, is a string containing text | 196 | (if (>= pos (point-min)) |
| 197 | to compose. | 197 | (progn |
| 198 | 198 | (goto-char pos) | |
| 199 | The return value is number of composed characters." | 199 | (if (looking-at pattern) |
| 200 | (if (< (1+ from) to) | 200 | (prog1 (match-end 0) |
| 201 | (prog1 (- to from) | 201 | (compose-region pos (match-end 0))))))))) |
| 202 | (if string | ||
| 203 | (compose-string string from to) | ||
| 204 | (compose-region from to)) | ||
| 205 | (- to from)))) | ||
| 206 | 202 | ||
| 207 | ;; | 203 | ;; |
| 208 | (provide 'thai-util) | 204 | (provide 'thai-util) |