[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r109694: Use AREF and ASET for docstr
From: |
Dmitry Antipov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r109694: Use AREF and ASET for docstrings of category tables. |
Date: |
Mon, 20 Aug 2012 12:20:25 +0400 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 109694
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Mon 2012-08-20 12:20:25 +0400
message:
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.
modified:
src/ChangeLog
src/category.c
src/category.h
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-08-20 08:07:38 +0000
+++ b/src/ChangeLog 2012-08-20 08:20:25 +0000
@@ -1,5 +1,12 @@
2012-08-20 Dmitry Antipov <address@hidden>
+ 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 <address@hidden>
+
Inline setter functions for hash table members.
* lisp.h (set_hash_key, set_hash_value, set_hash_next)
(set_hash_hash, set_hash_index): Rename with _slot suffix.
=== modified file 'src/category.c'
--- a/src/category.c 2012-08-18 06:06:39 +0000
+++ b/src/category.c 2012-08-20 08:20:25 +0000
@@ -143,7 +143,7 @@
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;
}
=== modified file 'src/category.h'
--- a/src/category.h 2012-08-02 07:31:34 +0000
+++ b/src/category.h 2012-08-20 08:20:25 +0000
@@ -96,8 +96,12 @@
#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. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r109694: Use AREF and ASET for docstrings of category tables.,
Dmitry Antipov <=