]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fset_char_table_default): Check only if the charset of
authorKenichi Handa <handa@m17n.org>
Mon, 6 Jul 1998 06:33:55 +0000 (06:33 +0000)
committerKenichi Handa <handa@m17n.org>
Mon, 6 Jul 1998 06:33:55 +0000 (06:33 +0000)
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

index 4d4a2184e15d915dccc6bdd7b92e6e0e5ddf9eb9..ae347c52e6b66bc5baf1961256c55f7bbf15f35c 100644 (file)
--- 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)