diff options
author | Kenichi Handa <handa@m17n.org> | 1997-02-27 11:15:29 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 1997-02-27 11:15:29 +0000 |
commit | 2ef6c1353f0e1217eb78661ebd14cae90d80a42a (patch) | |
tree | 60b2448c5234b6cb779aa8e59a9cbf918baa9ae2 /src | |
parent | 80eebbdff5e9d635ea8030262a15b7f81bc466b3 (diff) | |
download | emacs-2ef6c1353f0e1217eb78661ebd14cae90d80a42a.tar.gz |
(CATEGORY_SET): For a composite character, return
category set of the first component.
Diffstat (limited to 'src')
-rw-r--r-- | src/category.h | 23 |
1 files changed, 13 insertions, 10 deletions
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. */ |