# HG changeset patch # User Kenichi Handa # Date 1196926574 0 # Node ID 018583232611f04ceac02cef4872d4d7dcc4c560 # Parent 20eba9f5ae64d5af4a13eceb5a7a240f5915c9f2 (tibetan-composition-function): Use font-shape-text if auto-compose-current-font is non-nil. diff -r 20eba9f5ae64 -r 018583232611 lisp/language/tibet-util.el --- a/lisp/language/tibet-util.el Thu Dec 06 07:34:50 2007 +0000 +++ b/lisp/language/tibet-util.el Thu Dec 06 07:36:14 2007 +0000 @@ -317,13 +317,17 @@ ;;;###autoload (defun tibetan-composition-function (pos &optional string) - (setq pos (1- pos)) (if string - ;; Not yet implemented. - nil - (if (>= pos (point-min)) - (save-excursion - (goto-char pos) + (if auto-compose-current-font + (if (eq (string-match "[$(7!0(B-$,1GQ(B]+" pos) pos) + (or (font-shape-text 0 (match-end 0) auto-compose-current-font + string) + pos))) + (goto-char pos) + (if auto-compose-current-font + (if (looking-at "[$(7!0(B-$,1GQ(B]+") + (or (font-shape-text pos (match-end 0) auto-compose-current-font) + pos) (if (looking-at tibetan-composable-pattern) (prog1 (match-end 0) (tibetan-compose-region pos (match-end 0))))))))