changeset 46494:f59e00cee679

Populate utf-8-subst-rev-table. (utf-8-subst-table): Don't set.
author Dave Love <fx@gnu.org>
date Wed, 17 Jul 2002 10:36:16 +0000
parents 109eee3b7af4
children fc51841e5d97
files lisp/international/utf-8-subst.el
diffstat 1 files changed, 14 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/utf-8-subst.el	Wed Jul 17 10:32:38 2002 +0000
+++ b/lisp/international/utf-8-subst.el	Wed Jul 17 10:36:16 2002 +0000
@@ -1,6 +1,6 @@
 ;;; utf-8-subst.el --- translation of untranslatable utf-8 to CJK -*-coding: iso-2022-7bit;-*-
 
-;; Copyright (C) 2001  Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2002  Free Software Foundation, Inc.
 
 ;; Author: Dave Love <fx@gnu.org>
 ;; Keywords: i18n
@@ -24,27 +24,22 @@
 
 ;;; Commentary:
 
-;; Defines hash table `utf-8-subst-table' which maps UTF-8
+;; Defines hash table `utf-8-subst-table' which maps UTF-8 otherwise
 ;; `untranslatable' characters to characters in specific Emacs CJK
-;; charsets.  Values in the table can be used as the composition of
-;; such sequences for a more useful result.  The CJK charsets used are
-;; chinese-gb2312, japanese-jisx0208 and korean-ksc5601.  Where their
-;; Unicodes overlap, the priority used is J C K, guessing the
-;; likelihood of fonts being available generally.  This can be altered
-;; by changing the order in which the table is filled.  This should
-;; doubtless be cusomizable somehow.
+;; charsets.  The CJK charsets used are chinese-gb2312,
+;; japanese-jisx0208 and korean-ksc5601.  Where their Unicodes
+;; overlap, the priority used is J C K, guessing the likelihood of
+;; fonts being available generally.  This can be altered by changing
+;; the order in which the table is filled.  This should doubtless be
+;; cusomizable somehow.
 
 ;;; Code:
 
-(eval-when-compile (defvar utf-8-subst-table))
-
-(unless utf-8-subst-table
-  (setq utf-8-subst-table (make-hash-table :test 'eq :size 22000)))
-
 ;; korean-ksc5601
 (mapc
  (lambda (pair)
-   (puthash (car pair) (cadr pair) utf-8-subst-table))
+   (puthash (car pair) (cadr pair) utf-8-subst-table)
+   (puthash (cadr pair) (car pair) utf-8-subst-rev-table))
  '((#x4E00 ?$(Cli(B)
    (#x4E01 ?$(CoK(B)
    (#x4E03 ?$(CvR(B)
@@ -7019,7 +7014,8 @@
 ;; chinese-gb2312
 (mapc
  (lambda (pair)
-   (puthash (car pair) (cadr pair) utf-8-subst-table))
+   (puthash (car pair) (cadr pair) utf-8-subst-table)
+   (puthash (cadr pair) (car pair) utf-8-subst-rev-table))
  '((#x4E00 ?$AR;(B)
    (#x4E01 ?$A6!(B)
    (#x4E03 ?$AF_(B)
@@ -13788,7 +13784,8 @@
 ;; japanese-jisx0208
 (mapc
  (lambda (pair)
-   (puthash (car pair) (cadr pair) utf-8-subst-table))
+   (puthash (car pair) (cadr pair) utf-8-subst-table)
+   (puthash (cadr pair) (car pair) utf-8-subst-rev-table))
  '((#x4E00 ?$B0l(B)
    (#x4E01 ?$BCz(B)
    (#x4E03 ?$B<7(B)