summaryrefslogtreecommitdiff
path: root/lisp/language/lao-util.el
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2002-11-07 06:31:37 +0000
committerKenichi Handa <handa@m17n.org>2002-11-07 06:31:37 +0000
commit908ac9e20f7655f7edceb554760ec306368d6c2d (patch)
tree16694e4caafd7d385ea2a1e5cabcdda688e78cc9 /lisp/language/lao-util.el
parent9baf74e53c9f2f56253cf432d8f5271575218598 (diff)
downloademacs-908ac9e20f7655f7edceb554760ec306368d6c2d.tar.gz
(lao-post-read-conversion): Delete this
function. (lao-composition-function): Change arguments to conform to composition-function-table.
Diffstat (limited to 'lisp/language/lao-util.el')
-rw-r--r--lisp/language/lao-util.el40
1 files changed, 18 insertions, 22 deletions
diff --git a/lisp/language/lao-util.el b/lisp/language/lao-util.el
index 9a14e581e4a..0dee3e6285d 100644
--- a/lisp/language/lao-util.el
+++ b/lisp/language/lao-util.el
@@ -155,10 +155,10 @@
;; CV -> C, CT -> C, CVT -> C, Cv -> C, CvT -> C
;; v v
;; T
-;; V T V T
-;; CsV -> C, CsT -> C, CsVT -> C, Csv -> C, CvT -> C
-;; s s s s s
-;; v v
+;; V T V T
+;; CsV -> C, CsT -> C, CsVT -> C, Csv -> C, CsvT -> C
+;; s s s s s
+;; v v
;; where C: consonant, V: vowel upper, v: vowel lower,
@@ -519,24 +519,20 @@ syllable. In that case, FROM and TO are indexes to STR."
lao-str)))
;;;###autoload
-(defun lao-post-read-conversion (len)
- (lao-compose-region (point) (+ (point) len))
- len)
-
-;;;###autoload
-(defun lao-composition-function (from to pattern &optional string)
- "Compose Lao text in the region FROM and TO.
-The text matches the regular expression PATTERN.
-Optional 4th argument STRING, if non-nil, is a string containing text
-to compose.
-
-The return value is number of composed characters."
- (if (< (1+ from) to)
- (prog1 (- to from)
- (if string
- (compose-string string from to)
- (compose-region from to))
- (- to from))))
+(defun lao-composition-function (pos &optional string)
+ (setq pos (1- pos))
+ (with-category-table lao-category-table
+ (if string
+ (if (and (>= pos 0)
+ (eq (string-match lao-composition-pattern string pos) pos))
+ (prog1 (match-end 0)
+ (compose-string string pos (match-end 0))))
+ (if (>= pos (point-min))
+ (save-excursion
+ (goto-char pos)
+ (if (looking-at lao-composition-pattern)
+ (prog1 (match-end 0)
+ (compose-region pos (match-end 0)))))))))
;;;###autoload
(defun lao-compose-region (from to)