summaryrefslogtreecommitdiff
path: root/src/charset.c
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2008-11-29 01:46:07 +0000
committerKenichi Handa <handa@m17n.org>2008-11-29 01:46:07 +0000
commitb8ebe9dd7f7905aca424357697e833683e42bb2b (patch)
treeeae1d1ed8956971488d12f5153113183ebcbab7b /src/charset.c
parent2644eb3f38fb7ded679999f42dc867a98db42e91 (diff)
downloademacs-b8ebe9dd7f7905aca424357697e833683e42bb2b.tar.gz
(Fdefine_charset_internal): After calculating
min_char, max_char, and fastmap, copy the charset structure again. (encode_char): Fix the previous change.
Diffstat (limited to 'src/charset.c')
-rw-r--r--src/charset.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/charset.c b/src/charset.c
index 3c52d1f333f..ef6f3c22c8e 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -1199,7 +1199,10 @@ usage: (define-charset-internal ...) */)
charset_table[id] = charset;
if (charset.method == CHARSET_METHOD_MAP)
- load_charset (&charset, 0);
+ {
+ load_charset (&charset, 0);
+ charset_table[id] = charset;
+ }
if (charset.iso_final >= 0)
{
@@ -1855,8 +1858,11 @@ encode_char (charset, c)
encoder = CHARSET_ENCODER (charset);
if (! CHAR_TABLE_P (CHARSET_ENCODER (charset)))
- load_charset (charset);
- if (CHAR_TABLE_P (CHARSET_ENCODER (charset)))
+ {
+ load_charset (charset, 2);
+ encoder = CHARSET_ENCODER (charset);
+ }
+ if (CHAR_TABLE_P (encoder))
{
val = CHAR_TABLE_REF (encoder, c);
if (NILP (val))