summaryrefslogtreecommitdiff
path: root/src/category.h
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2012-08-20 12:20:25 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2012-08-20 12:20:25 +0400
commitf1a959923a6ead8f3a3e0590c16fa3114d91dc27 (patch)
tree61e909f354da9074dfde3debb8a2f10279b3f12e /src/category.h
parente83064befad4b03bae2f873ece63c050f2c4ca22 (diff)
downloademacs-f1a959923a6ead8f3a3e0590c16fa3114d91dc27.tar.gz
Use AREF and ASET for docstrings of category tables.
* category.h (CATEGORY_DOCSTRING): Use AREF. (SET_CATEGORY_DOCSTRING): Use ASET. * category.c (Fdefine_category): Use SET_CATEGORY_DOCSTRING.
Diffstat (limited to 'src/category.h')
-rw-r--r--src/category.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/category.h b/src/category.h
index f29034acff1..9fb981ed383 100644
--- a/src/category.h
+++ b/src/category.h
@@ -96,8 +96,12 @@ CHAR_HAS_CATEGORY (int ch, int category)
#define Vstandard_category_table BVAR (&buffer_defaults, category_table)
/* Return the doc string of CATEGORY in category table TABLE. */
-#define CATEGORY_DOCSTRING(table, category) \
- XVECTOR (Fchar_table_extra_slot (table, make_number (0)))->contents[(category) - ' ']
+#define CATEGORY_DOCSTRING(table, category) \
+ AREF (Fchar_table_extra_slot (table, make_number (0)), ((category) - ' '))
+
+/* Set the doc string of CATEGORY to VALUE in category table TABLE. */
+#define SET_CATEGORY_DOCSTRING(table, category, value) \
+ ASET (Fchar_table_extra_slot (table, make_number (0)), ((category) - ' '), value)
/* Return the version number of category table TABLE. Not used for
the moment. */