# HG changeset patch # User Kenichi Handa # Date 857042129 0 # Node ID 7130bd0ea697e83413bc14ad34439ae77fd09ef3 # Parent a5feb61ebe5ce3669771b7c4b17053960b791f77 (CATEGORY_SET): For a composite character, return category set of the first component. diff -r a5feb61ebe5c -r 7130bd0ea697 src/category.h --- a/src/category.h Thu Feb 27 11:13:46 1997 +0000 +++ b/src/category.h Thu Feb 27 11:15:29 1997 +0000 @@ -98,18 +98,21 @@ /* Return the category set of character C in the current category table. */ #ifdef __GNUC__ -#define CATEGORY_SET(c) \ - ({ Lisp_Object table = current_buffer->category_table; \ - Lisp_Object temp; \ - if (c < CHAR_TABLE_ORDINARY_SLOTS) \ - while (NILP (temp = XCHAR_TABLE (table)->contents[c]) \ - && NILP (temp = XCHAR_TABLE (table)->defalt)) \ - table = XCHAR_TABLE (table)->parent; \ - else \ - temp = Faref (table, c); \ +#define CATEGORY_SET(c) \ + ({ Lisp_Object table = current_buffer->category_table; \ + Lisp_Object temp; \ + if (c < CHAR_TABLE_ORDINARY_SLOTS) \ + while (NILP (temp = XCHAR_TABLE (table)->contents[c]) \ + && NILP (temp = XCHAR_TABLE (table)->defalt)) \ + table = XCHAR_TABLE (table)->parent; \ + else \ + temp = Faref (table, \ + COMPOSITE_CHAR_P (c) ? cmpchar_component (c, 0) : (c)); \ temp; }) #else -#define CATEGORY_SET(c) Faref (current_buffer->category_table, c) +#define CATEGORY_SET(c) \ + Faref (current_buffer->category_table, \ + COMPOSITE_CHAR_P (c) ? cmpchar_component (c, 0) : (c)) #endif /* Return the doc string of CATEGORY in category table TABLE. */