From: Kenichi Handa Date: Thu, 27 Feb 1997 11:15:29 +0000 (+0000) Subject: (CATEGORY_SET): For a composite character, return X-Git-Tag: emacs-20.1~2822 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=74d28e554025a236df409e5c1352bb5b92d7884b;p=emacs.git (CATEGORY_SET): For a composite character, return category set of the first component. --- diff --git a/src/category.h b/src/category.h index 723bdb023e5..956c6284b36 100644 --- a/src/category.h +++ b/src/category.h @@ -98,18 +98,21 @@ extern Lisp_Object _temp_category_set; /* 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. */