From: Kenichi Handa Date: Tue, 21 May 2002 04:22:33 +0000 (+0000) Subject: (Fdefine_charset_internal): Fix bug for the case of re-defining a X-Git-Tag: emacs-pretest-23.0.90~8295^2~1864^2~809 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4f65af013ec650af933680f93313486591aa7dcb;p=emacs.git (Fdefine_charset_internal): Fix bug for the case of re-defining a charset. If the charset has :emacs-mule-id, setup emacs_mule_bytes. --- diff --git a/src/charset.c b/src/charset.c index 51fc28c588a..11dd4b82b72 100644 --- a/src/charset.c +++ b/src/charset.c @@ -888,6 +888,7 @@ usage: (define-charset-internal ...) */) if (charset.hash_index >= 0) { new_definition_p = 0; + id = XFASTINT (CHARSET_SYMBOL_ID (args[charset_arg_name])); HASH_VALUE (hash_table, charset.hash_index) = attrs; } else @@ -903,11 +904,10 @@ usage: (define-charset-internal ...) */) sizeof (struct charset) * charset_table_size)); } id = charset_table_used++; - ASET (attrs, charset_id, make_number (id)); new_definition_p = 1; } - + ASET (attrs, charset_id, make_number (id)); charset.id = id; charset_table[id] = charset; @@ -923,6 +923,8 @@ usage: (define-charset-internal ...) */) if (charset.emacs_mule_id >= 0) { emacs_mule_charset[charset.emacs_mule_id] = CHARSET_FROM_ID (id); + if (charset.emacs_mule_id < 0xA0) + emacs_mule_bytes[charset.emacs_mule_id] = charset.dimension + 1; if (new_definition_p) Vemacs_mule_charset_list = nconc2 (Vemacs_mule_charset_list, Fcons (make_number (id), Qnil));