# HG changeset patch # User Kenichi Handa # Date 1219996779 0 # Node ID 5752f49a83140a1e347489f2c15d586307f26c8c # Parent 9966bae9459d8c9d04da14eaa6707c402acd7837 (lao-composition-function): Argument changed. diff -r 9966bae9459d -r 5752f49a8314 lisp/language/lao-util.el --- a/lisp/language/lao-util.el Fri Aug 29 07:59:21 2008 +0000 +++ b/lisp/language/lao-util.el Fri Aug 29 07:59:39 2008 +0000 @@ -492,18 +492,16 @@ ;;;###autoload (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 from) - (if (looking-at lao-composition-pattern) - (prog1 (match-end 0) - (compose-region from (match-end 0))))))))) + (if (= (lgstirng-char-len gstring) 1) + (compose-gstring-for-graphic gstring) + (or (font-shape-text from to font-object string)) + (let ((glyph-len (lgstring-glyph-len gstring)) + (i 0) + glyph) + (while (and (< i glyph-len) + (setq glyph (lgstring-glyph gstring i))) + (setq i (1+ i))) + (compose-glyph-string-relative gstring 0 i 0.1)))) ;;;###autoload (defun lao-compose-region (from to)