Commit 462a7ed6 authored by Stefan Monnier's avatar Stefan Monnier

(indian-regexp-of-hashtbl-keys): Don't sort the argument to regexp-opt.

(indian--puthash-char): Use dolist rather than mapc.
parent 9c0fb8b9
;;; ind-util.el --- Transliteration and Misc. Tools for Indian Languages -*- coding: iso-2022-7bit; -*-
;; Copyright (C) 2001 Free Software Foundation, Inc.
;; Copyright (C) 2001, 2003 Free Software Foundation, Inc.
;; Maintainer: KAWABATA, Taichi <kawabata@m17n.org>
;; Keywords: multilingual, Indian, Devanagari
......@@ -42,14 +42,9 @@
(defun indian-regexp-of-hashtbl-keys (hashtbl)
"Returns the regular expression of hashtable keys."
(let ((max-specpdl-size 1000))
(regexp-opt
(sort
(let (dummy)
(maphash (function (lambda (key val) (setq dummy (cons key dummy))))
hashtbl)
dummy)
(function (lambda (x y) (> (length x) (length y))))))))
(let (keys)
(maphash (lambda (key val) (push key keys)) hashtbl)
(regexp-opt keys)))
(defvar indian-dev-base-table
'(
......@@ -414,10 +409,8 @@ FUNCTION will be called 15 times."
(if (stringp trans-char) (setq trans-char (list trans-char)))
(if (char-valid-p char) (setq char (char-to-string char)))
(puthash char (car trans-char) encode-hash)
(mapc
(lambda (trans)
(puthash trans char decode-hash))
trans-char))))
(dolist (trans trans-char)
(puthash trans char decode-hash)))))
(defun indian--map (f l1 l2)
(while l1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment