comparison lisp/international/mule.el @ 49252:b38398e733f4

(optimize-char-coding-system-table): Optimize it.
author Kenichi Handa <handa@m17n.org>
date Wed, 15 Jan 2003 05:57:31 +0000
parents 4ecab4bfe0cd
children ed922baa8df3
comparison
equal deleted inserted replaced
49251:afbb682b9aa5 49252:b38398e733f4
602 ;; each other. As it is, with utf-translate-cjk on and 602 ;; each other. As it is, with utf-translate-cjk on and
603 ;; code-pages loaded, the table has ~50k elements, which are 603 ;; code-pages loaded, the table has ~50k elements, which are
604 ;; reduced to ~1k. (`optimize-char-table' might win if 604 ;; reduced to ~1k. (`optimize-char-table' might win if
605 ;; permutations were eliminated, but that's probably a small 605 ;; permutations were eliminated, but that's probably a small
606 ;; effect and not easy to test.) 606 ;; effect and not easy to test.)
607 (let ((existing (car (member v cache)))) 607 (if v
608 (if existing 608 (let ((existing (car (member v cache))))
609 (aset char-coding-system-table k existing) 609 (if existing
610 (push v cache)))) 610 (aset char-coding-system-table k existing)
611 (push v cache)))))
611 char-coding-system-table)) 612 char-coding-system-table))
612 (optimize-char-table char-coding-system-table)) 613 (optimize-char-table char-coding-system-table))
613 614
614 (defun register-char-codings (coding-system safe-chars) 615 (defun register-char-codings (coding-system safe-chars)
615 "Add entries for CODING-SYSTEM to `char-coding-system-table'. 616 "Add entries for CODING-SYSTEM to `char-coding-system-table'.