From: Kenichi Handa Date: Sat, 29 Nov 2008 13:47:31 +0000 (+0000) Subject: (CHAR_CHARSET_P): Check if the encoder is loaded or X-Git-Tag: emacs-pretest-23.0.90~1439 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8cc53f96e5dc3d647411e01298e4125ed4b00928;p=emacs.git (CHAR_CHARSET_P): Check if the encoder is loaded or not before accessing it. --- diff --git a/src/ChangeLog b/src/ChangeLog index e0575f03d76..1cb44419d1f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2008-11-29 Kenichi Handa + * charset.h (CHAR_CHARSET_P): Check if the encoder is loaded or + not before accessing it. + * charset.c (Fdefine_charset_internal): After calculating min_char, max_char, and fastmap, copy the charset structure again. (encode_char): Fix the previous change. diff --git a/src/charset.h b/src/charset.h index 1dac7add242..fa3f363a9e8 100644 --- a/src/charset.h +++ b/src/charset.h @@ -503,7 +503,8 @@ extern int iso_charset_table[ISO_MAX_DIMENSION][ISO_MAX_CHARS][ISO_MAX_FINAL]; && ((charset)->method == CHARSET_METHOD_OFFSET \ ? (c) >= (charset)->min_char && (c) <= (charset)->max_char \ : ((charset)->method == CHARSET_METHOD_MAP \ - && (charset)->compact_codes_p) \ + && (charset)->compact_codes_p \ + && CHAR_TABLE_P (CHARSET_ENCODER (charset))) \ ? ! NILP (CHAR_TABLE_REF (CHARSET_ENCODER (charset), (c))) \ : encode_char ((charset), (c)) != (charset)->invalid_code))))