(malayalam-composition-function): Use
authorKenichi Handa <handa@m17n.org>
Thu, 6 Dec 2007 07:33:02 +0000 (07:33 +0000)
committerKenichi Handa <handa@m17n.org>
Thu, 6 Dec 2007 07:33:02 +0000 (07:33 +0000)
font-shape-text if auto-compose-current-font is non-nil.

lisp/language/mlm-util.el

index 45d78c7..fb2965b 100644 (file)
 If STRING is not nil, it is a string, and POS is an index to the string.
 In this case, compose characters after POS of the string."
   (if string
-      ;; Not yet implemented.
-      nil
+      (if auto-compose-current-font
+         (if (eq (string-match "[\e$,1@ \e(B-\e$,1A?\e(B]+" pos) pos)
+             (or (font-shape-text 0 (match-end 0) auto-compose-current-font
+                                  string)
+                 pos)))
     (goto-char pos)
-    (if (looking-at malayalam-composable-pattern)
-       (prog1 (match-end 0)
-         (malayalam-compose-syllable-region pos (match-end 0))))))
+    (if auto-compose-current-font
+       (if (looking-at  "[\e$,1@ \e(B-\e$,1A?\e(B]+")
+           (or (font-shape-text pos (match-end 0) auto-compose-current-font)
+               pos)
+         (if (looking-at malayalam-composable-pattern)
+             (prog1 (match-end 0)
+               (malayalam-compose-syllable-region pos (match-end 0))))))))
 
 ;; Notes on conversion steps.