aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa1997-02-27 11:15:29 +0000
committerKenichi Handa1997-02-27 11:15:29 +0000
commit74d28e554025a236df409e5c1352bb5b92d7884b (patch)
treea3f2e1a9b9823894113a8488abb863b0d006d5c9 /src
parent7bce92a6736c5d0da30a5f8c07e004d889ebd799 (diff)
downloademacs-74d28e554025a236df409e5c1352bb5b92d7884b.tar.gz
emacs-74d28e554025a236df409e5c1352bb5b92d7884b.zip
(CATEGORY_SET): For a composite character, return
category set of the first component.
Diffstat (limited to 'src')
-rw-r--r--src/category.h23
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;
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. */