diff options
| author | Kenichi Handa | 2008-02-25 01:35:50 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2008-02-25 01:35:50 +0000 |
| commit | 446465b9d9b471ebba9a5854916f5600c3a044c0 (patch) | |
| tree | 4ed1a5dedfeaf3e911772d4d654bb7d0fc3767a4 | |
| parent | 622c2a53d814ea5cd80c0d72ecf391b70d6d11af (diff) | |
| download | emacs-446465b9d9b471ebba9a5854916f5600c3a044c0.tar.gz emacs-446465b9d9b471ebba9a5854916f5600c3a044c0.zip | |
(lao-composition-function): Adjusted for the new calling way.
| -rw-r--r-- | lisp/language/lao-util.el | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/lisp/language/lao-util.el b/lisp/language/lao-util.el index 5fc12d8455c..82e413bae04 100644 --- a/lisp/language/lao-util.el +++ b/lisp/language/lao-util.el | |||
| @@ -493,20 +493,19 @@ syllable. In that case, FROM and TO are indexes to STR." | |||
| 493 | lao-str))) | 493 | lao-str))) |
| 494 | 494 | ||
| 495 | ;;;###autoload | 495 | ;;;###autoload |
| 496 | (defun lao-composition-function (pos &optional string) | 496 | (defun lao-composition-function (from to font-object string) |
| 497 | (setq pos (1- pos)) | 497 | (or (and font-object |
| 498 | (with-category-table lao-category-table | 498 | (font-shape-text from to font-object string)) |
| 499 | (if string | 499 | (with-category-table lao-category-table |
| 500 | (if (and (>= pos 0) | 500 | (if string |
| 501 | (eq (string-match lao-composition-pattern string pos) pos)) | 501 | (if (eq (string-match lao-composition-pattern string from) to) |
| 502 | (prog1 (match-end 0) | 502 | (prog1 (match-end 0) |
| 503 | (compose-string string pos (match-end 0)))) | 503 | (compose-string string from (match-end 0)))) |
| 504 | (if (>= pos (point-min)) | ||
| 505 | (save-excursion | 504 | (save-excursion |
| 506 | (goto-char pos) | 505 | (goto-char from) |
| 507 | (if (looking-at lao-composition-pattern) | 506 | (if (looking-at lao-composition-pattern) |
| 508 | (prog1 (match-end 0) | 507 | (prog1 (match-end 0) |
| 509 | (compose-region pos (match-end 0))))))))) | 508 | (compose-region from (match-end 0))))))))) |
| 510 | 509 | ||
| 511 | ;;;###autoload | 510 | ;;;###autoload |
| 512 | (defun lao-compose-region (from to) | 511 | (defun lao-compose-region (from to) |