# HG changeset patch # User Kenichi Handa # Date 1021954953 0 # Node ID f4f7b1532dc3750b0db4bb7547af338db780f934 # Parent 516e1ece04773aaa7f887e504a548395f52e7cff (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 -r 516e1ece0477 -r f4f7b1532dc3 src/charset.c --- a/src/charset.c Mon May 20 19:10:41 2002 +0000 +++ b/src/charset.c Tue May 21 04:22:33 2002 +0000 @@ -888,6 +888,7 @@ 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 @@ 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 @@ 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));