]> git.eshelyaron.com Git - emacs.git/commitdiff
(tibetan-composition-function): Use
authorKenichi Handa <handa@m17n.org>
Thu, 6 Dec 2007 07:36:14 +0000 (07:36 +0000)
committerKenichi Handa <handa@m17n.org>
Thu, 6 Dec 2007 07:36:14 +0000 (07:36 +0000)
font-shape-text if auto-compose-current-font is non-nil.

lisp/language/tibet-util.el

index e9f5e67df9d19e54782e2de8d8aab745dfcc13cf..b58c60dc784fdb715ce9f2ecdc9833e7ae443c44 100644 (file)
@@ -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 "[\e$(7!0\e(B-\e$,1GQ\e(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 "[\e$(7!0\e(B-\e$,1GQ\e(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))))))))