From: tomo Date: Tue, 4 Sep 2001 10:15:27 +0000 (+0000) Subject: (struct Lisp_Char_Table): Add new member `default_value' in XEmacs X-Git-Tag: r21-2-41-chartab-2~4 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=117e2e94fe9d6c03f0163d66e624c0c6138e9aee;p=chise%2Fxemacs-chise.git.1 (struct Lisp_Char_Table): Add new member `default_value' in XEmacs UTF-2000. (CHAR_TABLE_VALUE_UNSAFE): Use `default_value'. (enum chartab_range_type): Add `CHARTAB_RANGE_DEFAULT' in XEmacs UTF-2000. --- diff --git a/src/chartab.h b/src/chartab.h index 1bfc4f4..40a135f 100644 --- a/src/chartab.h +++ b/src/chartab.h @@ -154,6 +154,7 @@ struct Lisp_Char_Table #ifdef UTF2000 Lisp_Object table; + Lisp_Object default_value; #else Lisp_Object ascii[NUM_ASCII_CHARS]; @@ -213,14 +214,18 @@ CHAR_TABLE_VALUE_UNSAFE (Lisp_Char_Table *ct, Emchar ch); INLINE_HEADER Lisp_Object CHAR_TABLE_VALUE_UNSAFE (Lisp_Char_Table *ct, Emchar ch) { - return get_byte_table (get_byte_table - (get_byte_table - (get_byte_table - (ct->table, - (unsigned char)(ch >> 24)), - (unsigned char) (ch >> 16)), - (unsigned char) (ch >> 8)), - (unsigned char) ch); + Lisp_Object val = get_byte_table (get_byte_table + (get_byte_table + (get_byte_table + (ct->table, + (unsigned char)(ch >> 24)), + (unsigned char) (ch >> 16)), + (unsigned char) (ch >> 8)), + (unsigned char) ch); + if (UNBOUNDP (val)) + return ct->default_value; + else + return val; } #elif defined(MULE) @@ -262,6 +267,9 @@ CHAR_TABLE_NON_ASCII_VALUE_UNSAFE (Lisp_Char_Table *ct, Emchar ch) enum chartab_range_type { CHARTAB_RANGE_ALL, +#ifdef UTF2000 + CHARTAB_RANGE_DEFAULT, +#endif #ifdef MULE CHARTAB_RANGE_CHARSET, CHARTAB_RANGE_ROW,