diff options
author | Kenichi Handa <handa@m17n.org> | 2008-02-25 01:35:50 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2008-02-25 01:35:50 +0000 |
commit | 446465b9d9b471ebba9a5854916f5600c3a044c0 (patch) | |
tree | 4ed1a5dedfeaf3e911772d4d654bb7d0fc3767a4 /lisp/language | |
parent | 622c2a53d814ea5cd80c0d72ecf391b70d6d11af (diff) | |
download | emacs-446465b9d9b471ebba9a5854916f5600c3a044c0.tar.gz emacs-446465b9d9b471ebba9a5854916f5600c3a044c0.tar.bz2 emacs-446465b9d9b471ebba9a5854916f5600c3a044c0.zip |
(lao-composition-function): Adjusted for the new calling way.
Diffstat (limited to 'lisp/language')
-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." lao-str))) ;;;###autoload -(defun lao-composition-function (pos &optional string) - (setq pos (1- pos)) - (with-category-table lao-category-table - (if string - (if (and (>= pos 0) - (eq (string-match lao-composition-pattern string pos) pos)) - (prog1 (match-end 0) - (compose-string string pos (match-end 0)))) - (if (>= pos (point-min)) +(defun lao-composition-function (from to font-object string) + (or (and font-object + (font-shape-text from to font-object string)) + (with-category-table lao-category-table + (if string + (if (eq (string-match lao-composition-pattern string from) to) + (prog1 (match-end 0) + (compose-string string from (match-end 0)))) (save-excursion - (goto-char pos) + (goto-char from) (if (looking-at lao-composition-pattern) (prog1 (match-end 0) - (compose-region pos (match-end 0))))))))) + (compose-region from (match-end 0))))))))) ;;;###autoload (defun lao-compose-region (from to) |