From 0da528a90911420aa3ea47e67bd9b43ad52be680 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 6 Jul 1998 06:33:55 +0000 Subject: [PATCH] (Fset_char_table_default): Check only if the charset of the arg CH is in the valid range or not. Handle the case that CH is a generic character for composite characters. --- src/fns.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/fns.c b/src/fns.c index 4d4a2184e15..ae347c52e6b 100644 --- a/src/fns.c +++ b/src/fns.c @@ -1998,15 +1998,19 @@ See also the documentation of make-char.") c = XINT (ch); SPLIT_NON_ASCII_CHAR (c, charset, code1, code2); - if (! CHARSET_DEFINED_P (charset)) - invalid_character (c); + + /* Since we may want to set the default value for a character set + not yet defined, we check only if the character set is in the + valid range or not, instead of it is already defined or not. */ + if (! CHARSET_VALID_P (charset)) + invalid_character (c); if (charset == CHARSET_ASCII) return (XCHAR_TABLE (char_table)->defalt = value); /* Even if C is not a generic char, we had better behave as if a generic char is specified. */ - if (CHARSET_DIMENSION (charset) == 1) + if (charset == CHARSET_COMPOSITION || CHARSET_DIMENSION (charset) == 1) code1 = 0; temp = XCHAR_TABLE (char_table)->contents[charset + 128]; if (!code1) -- 2.39.5