+2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
+
+ 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.
+
2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
Inline setter functions for hash table members.
error ("Category `%c' is already defined", (int) XFASTINT (category));
if (!NILP (Vpurify_flag))
docstring = Fpurecopy (docstring);
- CATEGORY_DOCSTRING (table, XFASTINT (category)) = docstring;
+ SET_CATEGORY_DOCSTRING (table, XFASTINT (category), docstring);
return Qnil;
}
#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. */