/[emacs]/emacs/lisp/language/ind-util.el
ViewVC logotype

Diff of /emacs/lisp/language/ind-util.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5.4.1 by miles, Fri Apr 4 06:20:26 2003 UTC revision 1.5.4.2 by miles, Tue Oct 14 23:39:25 2003 UTC
# Line 1  Line 1 
1  ;;; ind-util.el --- Transliteration and Misc. Tools for Indian Languages -*- coding: iso-2022-7bit; -*-  ;;; ind-util.el --- Transliteration and Misc. Tools for Indian Languages -*- coding: iso-2022-7bit; -*-
2    
3  ;; Copyright (C) 2001 Free Software Foundation, Inc.  ;; Copyright (C) 2001, 2003 Free Software Foundation, Inc.
4    
5  ;; Maintainer:  KAWABATA, Taichi <kawabata@m17n.org>  ;; Maintainer:  KAWABATA, Taichi <kawabata@m17n.org>
6  ;; Keywords: multilingual, Indian, Devanagari  ;; Keywords: multilingual, Indian, Devanagari
# Line 42  Line 42 
42    
43  (defun indian-regexp-of-hashtbl-keys (hashtbl)  (defun indian-regexp-of-hashtbl-keys (hashtbl)
44    "Returns the regular expression of hashtable keys."    "Returns the regular expression of hashtable keys."
45    (let ((max-specpdl-size 1000))    (let (keys)
46      (regexp-opt      (maphash (lambda (key val) (push key keys)) hashtbl)
47       (sort      (regexp-opt keys)))
       (let (dummy)  
         (maphash (function (lambda (key val) (setq dummy (cons key dummy))))  
                  hashtbl)  
         dummy)  
       (function (lambda (x y) (> (length x) (length y))))))))  
48    
49  (defvar indian-dev-base-table  (defvar indian-dev-base-table
50    '(    '(
# Line 414  FUNCTION will be called 15 times." Line 409  FUNCTION will be called 15 times."
409        (if (stringp trans-char) (setq trans-char (list trans-char)))        (if (stringp trans-char) (setq trans-char (list trans-char)))
410        (if (char-valid-p char) (setq char (char-to-string char)))        (if (char-valid-p char) (setq char (char-to-string char)))
411        (puthash char (car trans-char) encode-hash)        (puthash char (car trans-char) encode-hash)
412        (mapc        (dolist (trans trans-char)
413         (lambda (trans)           (puthash trans char decode-hash)))))
          (puthash trans char decode-hash))  
        trans-char))))  
414    
415  (defun indian--map (f l1 l2)  (defun indian--map (f l1 l2)
416    (while l1    (while l1
# Line 1224  Returns new end position." Line 1217  Returns new end position."
1217              (if (= len 1)              (if (= len 1)
1218                  (setq subst (aref indian-2-column-to-ucs-chartable                  (setq subst (aref indian-2-column-to-ucs-chartable
1219                                    (char-after (match-beginning 0))))                                    (char-after (match-beginning 0))))
1220                (setq subst (assoc (match-string 0) alist)))                (setq subst (cdr (assoc (match-string 0) alist))))
1221              (replace-match (if subst subst "?"))))              (replace-match (if subst subst "?"))))
1222          (indian-compose-region (point-min) (point-max))))))          (indian-compose-region (point-min) (point-max))))))
1223    
# Line 1266  See also the function `indian-glyph-char Line 1259  See also the function `indian-glyph-char
1259    
1260  (provide 'ind-util)  (provide 'ind-util)
1261    
1262    ;;; arch-tag: 59aacd71-46c2-4cb3-bb26-e12bbad55545
1263  ;;; ind-util.el ends here  ;;; ind-util.el ends here

Legend:
Removed from v.1.5.4.1  
changed lines
  Added in v.1.5.4.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26