Mercurial > emacs
comparison lisp/language/lao-util.el @ 97838:5752f49a8314
(lao-composition-function): Argument changed.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 29 Aug 2008 07:59:39 +0000 |
parents | 55b7f25d920a |
children | 521da036775a |
comparison
equal
deleted
inserted
replaced
97837:9966bae9459d | 97838:5752f49a8314 |
---|---|
490 (concat lao-str (substring str from to)) | 490 (concat lao-str (substring str from to)) |
491 lao-str))) | 491 lao-str))) |
492 | 492 |
493 ;;;###autoload | 493 ;;;###autoload |
494 (defun lao-composition-function (from to font-object string) | 494 (defun lao-composition-function (from to font-object string) |
495 (or (and font-object | 495 (if (= (lgstirng-char-len gstring) 1) |
496 (font-shape-text from to font-object string)) | 496 (compose-gstring-for-graphic gstring) |
497 (with-category-table lao-category-table | 497 (or (font-shape-text from to font-object string)) |
498 (if string | 498 (let ((glyph-len (lgstring-glyph-len gstring)) |
499 (if (eq (string-match lao-composition-pattern string from) to) | 499 (i 0) |
500 (prog1 (match-end 0) | 500 glyph) |
501 (compose-string string from (match-end 0)))) | 501 (while (and (< i glyph-len) |
502 (save-excursion | 502 (setq glyph (lgstring-glyph gstring i))) |
503 (goto-char from) | 503 (setq i (1+ i))) |
504 (if (looking-at lao-composition-pattern) | 504 (compose-glyph-string-relative gstring 0 i 0.1)))) |
505 (prog1 (match-end 0) | |
506 (compose-region from (match-end 0))))))))) | |
507 | 505 |
508 ;;;###autoload | 506 ;;;###autoload |
509 (defun lao-compose-region (from to) | 507 (defun lao-compose-region (from to) |
510 (interactive "r") | 508 (interactive "r") |
511 (save-restriction | 509 (save-restriction |