summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2007-12-06 07:36:14 +0000
committerKenichi Handa <handa@m17n.org>2007-12-06 07:36:14 +0000
commit8c2e06cdf0c9931bbfd7142a090a228c872b5295 (patch)
tree741296cd21dc57ea5a1b95e67e0c5f973e843b52 /lisp
parent599deafe67125baea91a2024add916256992a4d2 (diff)
downloademacs-8c2e06cdf0c9931bbfd7142a090a228c872b5295.tar.gz
(tibetan-composition-function): Use
font-shape-text if auto-compose-current-font is non-nil.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/language/tibet-util.el16
1 files changed, 10 insertions, 6 deletions
diff --git a/lisp/language/tibet-util.el b/lisp/language/tibet-util.el
index e9f5e67df9d..b58c60dc784 100644
--- a/lisp/language/tibet-util.el
+++ b/lisp/language/tibet-util.el
@@ -317,13 +317,17 @@ are decomposed into normal Tibetan character sequences."
;;;###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))))))))