From c0be27fda00b238ea82e43a8590a96c3a9ae9023 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Tue, 20 Apr 2010 15:30:26 +0900 Subject: [PATCH] charset.c (char_charset): Consider Vcharset_non_preferred_head only when the arg CHARSET_LIST is nil. --- src/ChangeLog | 5 +++++ src/charset.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 17915b318ff..856cc1aec64 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-04-20 Kenichi Handa + + * charset.c (char_charset): Consider Vcharset_non_preferred_head + only when the arg CHARSET_LIST is nil. + 2010-04-19 Eli Zaretskii * xdisp.c (display_line): Don't write beyond the last glyph row in diff --git a/src/charset.c b/src/charset.c index 125c9131687..18c0bbb6310 100644 --- a/src/charset.c +++ b/src/charset.c @@ -2082,8 +2082,9 @@ char_charset (c, charset_list, code_return) return charset; } charset_list = XCDR (charset_list); - if (c <= MAX_UNICODE_CHAR - && EQ (charset_list, Vcharset_non_preferred_head)) + if (! maybe_null + && c <= MAX_UNICODE_CHAR + && EQ (charset_list, Vcharset_non_preferred_head)) return CHARSET_FROM_ID (charset_unicode); } return (maybe_null ? NULL -- 2.39.2