aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2003-05-01 04:39:07 +0000
committerKenichi Handa2003-05-01 04:39:07 +0000
commit2bf07f07f73381041e8d6e2a5b643b0cb95d9423 (patch)
tree97670a417164a07f668895d07b6155024fb5fa1d
parentb666620cdd330b6759d95339b52819b54ec217f3 (diff)
downloademacs-2bf07f07f73381041e8d6e2a5b643b0cb95d9423.tar.gz
emacs-2bf07f07f73381041e8d6e2a5b643b0cb95d9423.zip
(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.
-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."
246 (load "subst-gb2312") 246 (load "subst-gb2312")
247 (load "subst-big5") 247 (load "subst-big5")
248 (load "subst-jis"))) ; jis covers as much as big5, gb2312 248 (load "subst-jis"))) ; jis covers as much as big5, gb2312
249 (let ((table (make-char-table 'translation-table))) 249 (define-translation-hash-table 'utf-subst-table-for-decode
250 (maphash (lambda (k v) 250 ucs-unicode-to-mule-cjk)
251 (aset table k t)) 251 (define-translation-hash-table 'utf-subst-table-for-encode
252 ucs-mule-cjk-to-unicode) 252 ucs-mule-cjk-to-unicode)
253 (define-translation-hash-table 'utf-subst-table-for-decode 253 (set-char-table-extra-slot (get 'utf-translation-table-for-encode
254 ucs-unicode-to-mule-cjk) 254 'translation-table)
255 (define-translation-hash-table 'utf-subst-table-for-encode 255 1 ucs-mule-cjk-to-unicode))
256 ucs-mule-cjk-to-unicode)))
257 (define-translation-hash-table 'utf-subst-table-for-decode 256 (define-translation-hash-table 'utf-subst-table-for-decode
258 (make-hash-table :test 'eq)) 257 (make-hash-table :test 'eq))
259 (define-translation-hash-table 'utf-subst-table-for-encode 258 (define-translation-hash-table 'utf-subst-table-for-encode
260 (make-hash-table :test 'eq)))) 259 (make-hash-table :test 'eq))
260 (set-char-table-extra-slot (get 'utf-translation-table-for-encode
261 'translation-table)
262 1 nil)))
261 263
262(define-ccl-program ccl-decode-mule-utf-8 264(define-ccl-program ccl-decode-mule-utf-8
263 ;; 265 ;;
@@ -800,6 +802,7 @@ sequence representing U+FFFD (REPLACEMENT CHARACTER)."
800 (valid-codes (0 . 255)) 802 (valid-codes (0 . 255))
801;; (pre-write-conversion . utf-8-pre-write-conversion) 803;; (pre-write-conversion . utf-8-pre-write-conversion)
802 (post-read-conversion . utf-8-post-read-conversion) 804 (post-read-conversion . utf-8-post-read-conversion)
805 (translation-table-for-encode . utf-translation-table-for-encode)
803 (dependency unify-8859-on-encoding-mode 806 (dependency unify-8859-on-encoding-mode
804 unify-8859-on-decoding-mode 807 unify-8859-on-decoding-mode
805 utf-fragment-on-decoding 808 utf-fragment-on-decoding