Commit f1a95992 authored by Dmitry Antipov's avatar Dmitry Antipov

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.
parent e83064be
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.
......
......@@ -143,7 +143,7 @@ the current buffer's category table. */)
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;
}
......
......@@ -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. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment