From e314a6e4fe9d6d75c789d3efe84423738b8ef0d6 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 27 Dec 2004 06:13:15 +0000 Subject: [PATCH] (utf-translate-cjk-load-tables): Bind coding-system-for-read to nil while loading subst-*. --- lisp/ChangeLog | 5 +++++ lisp/international/utf-8.el | 44 ++++++++++++++++++++----------------- 2 files changed, 29 insertions(+), 20 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 34fab033121..42fdf4869f9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-12-27 Kenichi Handa + + * international/utf-8.el (utf-translate-cjk-load-tables): Bind + coding-system-for-read to nil while loading subst-*. + 2004-12-26 Jay Belanger * calc/calc-store.el (calc-read-var-name): Remove "var-" from diff --git a/lisp/international/utf-8.el b/lisp/international/utf-8.el index ed658eb3ddf..2fa096300d2 100644 --- a/lisp/international/utf-8.el +++ b/lisp/international/utf-8.el @@ -305,26 +305,30 @@ use either \\[customize] or the function ;; Load the files explicitly, to avoid having to keep ;; around the large tables they contain (as well as the ;; ones which get built). - (cond ((string= "Korean" current-language-environment) - (load "subst-jis") - (load "subst-big5") - (load "subst-gb2312") - (load "subst-ksc")) - ((string= "Chinese-BIG5" current-language-environment) - (load "subst-jis") - (load "subst-ksc") - (load "subst-gb2312") - (load "subst-big5")) - ((string= "Chinese-GB" current-language-environment) - (load "subst-jis") - (load "subst-ksc") - (load "subst-big5") - (load "subst-gb2312")) - (t - (load "subst-ksc") - (load "subst-gb2312") - (load "subst-big5") - (load "subst-jis"))) ; jis covers as much as big5, gb2312 + ;; Here we bind coding-system-for-read to nil so that coding tags + ;; in the files are respected even if the files are not yet + ;; byte-compiled + (let ((coding-system-for-read nil)) + (cond ((string= "Korean" current-language-environment) + (load "subst-jis") + (load "subst-big5") + (load "subst-gb2312") + (load "subst-ksc")) + ((string= "Chinese-BIG5" current-language-environment) + (load "subst-jis") + (load "subst-ksc") + (load "subst-gb2312") + (load "subst-big5")) + ((string= "Chinese-GB" current-language-environment) + (load "subst-jis") + (load "subst-ksc") + (load "subst-big5") + (load "subst-gb2312")) + (t + (load "subst-ksc") + (load "subst-gb2312") + (load "subst-big5") + (load "subst-jis")))) ; jis covers as much as big5, gb2312 (when redefined (define-translation-hash-table 'utf-subst-table-for-decode -- 2.39.5