summaryrefslogtreecommitdiff
path: root/lisp/international/utf-8.el
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2003-05-01 04:39:07 +0000
committerKenichi Handa <handa@m17n.org>2003-05-01 04:39:07 +0000
commit2bf07f07f73381041e8d6e2a5b643b0cb95d9423 (patch)
tree97670a417164a07f668895d07b6155024fb5fa1d /lisp/international/utf-8.el
parentb666620cdd330b6759d95339b52819b54ec217f3 (diff)
downloademacs-2bf07f07f73381041e8d6e2a5b643b0cb95d9423.tar.gz
(utf-translate-cjk-mode): Update the
second extra slot of the translation table utf-translation-table-for-encode. (mule-utf-8): Set the property translation-table-for-encode.
Diffstat (limited to 'lisp/international/utf-8.el')
-rw-r--r--lisp/international/utf-8.el21
1 files changed, 12 insertions, 9 deletions
diff --git a/lisp/international/utf-8.el b/lisp/international/utf-8.el
index 634020920b2..b95ff8e548f 100644
--- a/lisp/international/utf-8.el
+++ b/lisp/international/utf-8.el
@@ -246,18 +246,20 @@ default. Also, installing them may be rather slow."
(load "subst-gb2312")
(load "subst-big5")
(load "subst-jis"))) ; jis covers as much as big5, gb2312
- (let ((table (make-char-table 'translation-table)))
- (maphash (lambda (k v)
- (aset table k t))
- ucs-mule-cjk-to-unicode)
- (define-translation-hash-table 'utf-subst-table-for-decode
- ucs-unicode-to-mule-cjk)
- (define-translation-hash-table 'utf-subst-table-for-encode
- ucs-mule-cjk-to-unicode)))
+ (define-translation-hash-table 'utf-subst-table-for-decode
+ ucs-unicode-to-mule-cjk)
+ (define-translation-hash-table 'utf-subst-table-for-encode
+ ucs-mule-cjk-to-unicode)
+ (set-char-table-extra-slot (get 'utf-translation-table-for-encode
+ 'translation-table)
+ 1 ucs-mule-cjk-to-unicode))
(define-translation-hash-table 'utf-subst-table-for-decode
(make-hash-table :test 'eq))
(define-translation-hash-table 'utf-subst-table-for-encode
- (make-hash-table :test 'eq))))
+ (make-hash-table :test 'eq))
+ (set-char-table-extra-slot (get 'utf-translation-table-for-encode
+ 'translation-table)
+ 1 nil)))
(define-ccl-program ccl-decode-mule-utf-8
;;
@@ -800,6 +802,7 @@ sequence representing U+FFFD (REPLACEMENT CHARACTER)."
(valid-codes (0 . 255))
;; (pre-write-conversion . utf-8-pre-write-conversion)
(post-read-conversion . utf-8-post-read-conversion)
+ (translation-table-for-encode . utf-translation-table-for-encode)
(dependency unify-8859-on-encoding-mode
unify-8859-on-decoding-mode
utf-fragment-on-decoding