]> git.eshelyaron.com Git - emacs.git/commitdiff
(tibetan-composition-function): Adjusted for the new calling way
authorKenichi Handa <handa@m17n.org>
Mon, 25 Feb 2008 01:38:06 +0000 (01:38 +0000)
committerKenichi Handa <handa@m17n.org>
Mon, 25 Feb 2008 01:38:06 +0000 (01:38 +0000)
(argument changed).  Try font-shape-text if possible.

lisp/language/tibet-util.el

index 88f970e57049f7756298f9c6acf98a7c5ae0af81..5dc948ed90e30fe0205fc6a627556577471f0719 100644 (file)
@@ -316,21 +316,12 @@ are decomposed into normal Tibetan character sequences."
     new))
 
 ;;;###autoload
-(defun tibetan-composition-function (pos &optional string)
-  (if string
-      (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))))))))
+(defun tibetan-composition-function (from to font-object string)
+  (or (and font-object
+          (font-shape-text from to font-object string))
+      (if string
+         (tibetan-compose-string string)
+       (tibetan-compose-region from to))))
 
 ;;;
 ;;; This variable is used to avoid repeated decomposition.