aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2003-03-18 04:06:48 +0000
committerKenichi Handa2003-03-18 04:06:48 +0000
commit535665b85be88f6eab03bbcdd2d7cea56e686fe7 (patch)
treee7937a2fec963238576ac252081ac1128d0010dc
parent2a2071c381c188c9e94e64937e08e53a9658a199 (diff)
downloademacs-535665b85be88f6eab03bbcdd2d7cea56e686fe7.tar.gz
emacs-535665b85be88f6eab03bbcdd2d7cea56e686fe7.zip
(utf-fragment-on-decoding): Don't call
register-char-codings. (utf-fragment-on-decoding): Don't update char-coding-system-table. (utf-translate-cjk): Don't call register-char-codings nor optimize-char-coding-system-table. Don't update char-coding-system-table.
-rw-r--r--lisp/international/utf-8.el33
1 files changed, 4 insertions, 29 deletions
diff --git a/lisp/international/utf-8.el b/lisp/international/utf-8.el
index c579a564ca7..343b007b1e2 100644
--- a/lisp/international/utf-8.el
+++ b/lisp/international/utf-8.el
@@ -48,8 +48,7 @@
48;; 48;;
49;; Characters from other character sets can be encoded with mule-utf-8 49;; Characters from other character sets can be encoded with mule-utf-8
50;; by populating the translation table 50;; by populating the translation table
51;; `utf-translation-table-for-encode' and registering the translation 51;; `utf-translation-table-for-encode'. Hash tables
52;; with `register-char-codings'. Hash tables
53;; `utf-subst-table-for-decode' and `utf-subst-table-for-encode' are 52;; `utf-subst-table-for-decode' and `utf-subst-table-for-encode' are
54;; used to support encoding and decoding of about a quarter of the CJK 53;; used to support encoding and decoding of about a quarter of the CJK
55;; space between U+3400 and U+DFFF. 54;; space between U+3400 and U+DFFF.
@@ -177,9 +176,7 @@ Setting this variable outside customize has no effect."
177 'translation-table) 176 'translation-table)
178 ucs-mule-to-mule-unicode) 177 ucs-mule-to-mule-unicode)
179 (define-translation-table 'utf-translation-table-for-encode 178 (define-translation-table 'utf-translation-table-for-encode
180 utf-defragmentation-table) 179 utf-defragmentation-table)))
181 (dolist (coding '(mule-utf-8 mule-utf-16-be mule-utf-16-le))
182 (register-char-codings coding utf-defragmentation-table))))
183 (define-translation-table 'utf-translation-table-for-decode) 180 (define-translation-table 'utf-translation-table-for-decode)
184 ;; When unify-8859-on-encoding-mode is off, be sure to make 181 ;; When unify-8859-on-encoding-mode is off, be sure to make
185 ;; mule-utf-* disabled for characters in 182 ;; mule-utf-* disabled for characters in
@@ -187,17 +184,7 @@ Setting this variable outside customize has no effect."
187 (unless (eq (get 'utf-translation-table-for-encode 184 (unless (eq (get 'utf-translation-table-for-encode
188 'translation-table) 185 'translation-table)
189 ucs-mule-to-mule-unicode) 186 ucs-mule-to-mule-unicode)
190 (define-translation-table 'utf-translation-table-for-encode) 187 (define-translation-table 'utf-translation-table-for-encode)))
191 (map-char-table
192 (lambda (key val)
193 (if (and (>= key 128) val)
194 (aset char-coding-system-table key
195 (remq 'mule-utf-8
196 (remq 'mule-utf-16-le
197 (remq 'mule-utf-16-be
198 (aref char-coding-system-table
199 key)))))))
200 utf-defragmentation-table)))
201 (set-default s v)) 188 (set-default s v))
202 :version "21.4" 189 :version "21.4"
203 :type 'boolean 190 :type 'boolean
@@ -258,26 +245,14 @@ default. Also, installing them may be rather slow."
258 (maphash (lambda (k v) 245 (maphash (lambda (k v)
259 (aset table k t)) 246 (aset table k t))
260 ucs-mule-cjk-to-unicode) 247 ucs-mule-cjk-to-unicode)
261 (register-char-codings 'mule-utf-8 table)
262 (register-char-codings 'mule-utf-16-le table)
263 (register-char-codings 'mule-utf-16-be table))
264 (define-translation-hash-table 'utf-subst-table-for-decode 248 (define-translation-hash-table 'utf-subst-table-for-decode
265 ucs-unicode-to-mule-cjk) 249 ucs-unicode-to-mule-cjk)
266 (define-translation-hash-table 'utf-subst-table-for-encode 250 (define-translation-hash-table 'utf-subst-table-for-encode
267 ucs-mule-cjk-to-unicode)) 251 ucs-mule-cjk-to-unicode))
268 (map-char-table
269 (lambda (k v)
270 (if (gethash k ucs-mule-cjk-to-unicode)
271 (aset char-coding-system-table k
272 (remq 'mule-utf-8
273 (remq 'mule-utf-16-le
274 (remq 'mule-utf-16-be v))))))
275 char-coding-system-table)
276 (define-translation-hash-table 'utf-subst-table-for-decode 252 (define-translation-hash-table 'utf-subst-table-for-decode
277 (make-hash-table :test 'eq)) 253 (make-hash-table :test 'eq))
278 (define-translation-hash-table 'utf-subst-table-for-encode 254 (define-translation-hash-table 'utf-subst-table-for-encode
279 (make-hash-table :test 'eq))) 255 (make-hash-table :test 'eq))))
280 (optimize-char-coding-system-table)
281 (set-default s v)) 256 (set-default s v))
282 :version "21.4" 257 :version "21.4"
283 :type 'boolean 258 :type 'boolean