emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/language/knd-util.el,v


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/language/knd-util.el,v
Date: Fri, 01 Feb 2008 16:02:31 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Miles Bader <miles>     08/02/01 16:01:31

Index: lisp/language/knd-util.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/language/knd-util.el,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- lisp/language/knd-util.el   8 Jan 2008 20:45:57 -0000       1.8
+++ lisp/language/knd-util.el   1 Feb 2008 16:01:03 -0000       1.9
@@ -114,21 +114,18 @@
        dummy)
       (function (lambda (x y) (> (length x) (length y))))))))
 
-(defun kannada-composition-function (from to pattern &optional string)
-  "Compose Kannada characters in REGION, or STRING if specified.
-Assume that the REGION or STRING must fully match the composable
-PATTERN regexp."
-  (if string (kannada-compose-syllable-string string)
-    (kannada-compose-syllable-region from to))
-  (- to from))
-
-;; Register a function to compose Kannada characters.
-(mapc
- (function (lambda (ucs)
-   (aset composition-function-table (decode-char 'ucs ucs)
-        (list (cons kannada-composable-pattern
-                     'kannada-composition-function)))))
- (kannada-range #x0c80 #x0cff))
+;;;###autoload
+(defun kannada-composition-function (pos &optional string)
+  "Compose Kannada characters after the position POS.
+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
+    (goto-char pos)
+    (if (looking-at kannada-composable-pattern)
+       (prog1 (match-end 0)
+         (kannada-compose-syllable-region pos (match-end 0))))))
 
 ;; Notes on conversion steps.
 
@@ -299,8 +296,8 @@
 
 (defun knd-charseq (from &optional to)
   (if (null to) (setq to from))
-  (mapcar (function (lambda (x) (indian-glyph-char x 'kannada)))
-          (kannada-range from to)))
+  (number-sequence (decode-char 'kannada-cdac from)
+                  (decode-char 'kannada-cdac to)))
 
 (defvar knd-glyph-cv
   (append




reply via email to

[Prev in Thread] Current Thread [Next in Thread]