Mercurial > emacs
comparison src/category.h @ 17123:7130bd0ea697
(CATEGORY_SET): For a composite character, return
category set of the first component.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Thu, 27 Feb 1997 11:15:29 +0000 |
parents | 70194012fb3a |
children | 124013c4d7b2 |
comparison
equal
deleted
inserted
replaced
17122:a5feb61ebe5c | 17123:7130bd0ea697 |
---|---|
96 be used in all new buffers. */ | 96 be used in all new buffers. */ |
97 #define Vstandard_category_table buffer_defaults.category_table | 97 #define Vstandard_category_table buffer_defaults.category_table |
98 | 98 |
99 /* Return the category set of character C in the current category table. */ | 99 /* Return the category set of character C in the current category table. */ |
100 #ifdef __GNUC__ | 100 #ifdef __GNUC__ |
101 #define CATEGORY_SET(c) \ | 101 #define CATEGORY_SET(c) \ |
102 ({ Lisp_Object table = current_buffer->category_table; \ | 102 ({ Lisp_Object table = current_buffer->category_table; \ |
103 Lisp_Object temp; \ | 103 Lisp_Object temp; \ |
104 if (c < CHAR_TABLE_ORDINARY_SLOTS) \ | 104 if (c < CHAR_TABLE_ORDINARY_SLOTS) \ |
105 while (NILP (temp = XCHAR_TABLE (table)->contents[c]) \ | 105 while (NILP (temp = XCHAR_TABLE (table)->contents[c]) \ |
106 && NILP (temp = XCHAR_TABLE (table)->defalt)) \ | 106 && NILP (temp = XCHAR_TABLE (table)->defalt)) \ |
107 table = XCHAR_TABLE (table)->parent; \ | 107 table = XCHAR_TABLE (table)->parent; \ |
108 else \ | 108 else \ |
109 temp = Faref (table, c); \ | 109 temp = Faref (table, \ |
110 COMPOSITE_CHAR_P (c) ? cmpchar_component (c, 0) : (c)); \ | |
110 temp; }) | 111 temp; }) |
111 #else | 112 #else |
112 #define CATEGORY_SET(c) Faref (current_buffer->category_table, c) | 113 #define CATEGORY_SET(c) \ |
114 Faref (current_buffer->category_table, \ | |
115 COMPOSITE_CHAR_P (c) ? cmpchar_component (c, 0) : (c)) | |
113 #endif | 116 #endif |
114 | 117 |
115 /* Return the doc string of CATEGORY in category table TABLE. */ | 118 /* Return the doc string of CATEGORY in category table TABLE. */ |
116 #define CATEGORY_DOCSTRING(table, category) \ | 119 #define CATEGORY_DOCSTRING(table, category) \ |
117 XVECTOR (Fchar_table_extra_slot (table, 0))->contents[(category) - ' '] | 120 XVECTOR (Fchar_table_extra_slot (table, 0))->contents[(category) - ' '] |