diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2012-08-16 07:13:44 +0400 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2012-08-16 07:13:44 +0400 |
commit | a098c9308eb2abee17d1f800d5895c12f471097e (patch) | |
tree | cd5a85bcfd0d1554fcc0fa5f359fe63074caec58 /src/casetab.c | |
parent | 8be3a09c4f4ed0eae2902b81e80856e917a81b2d (diff) | |
download | emacs-a098c9308eb2abee17d1f800d5895c12f471097e.tar.gz |
Simple interface to set Lisp_Object fields of chararcter tables.
* lisp.h (CSET): New macro.
(char_table_set_extras, char_table_set_contents)
(sub_char_table_set_contents): New function.
* casetab.c, category.c, chartab.c, fns.c, fontset.c, search.c:
* syntax.c: Adjust users.
Diffstat (limited to 'src/casetab.c')
-rw-r--r-- | src/casetab.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/casetab.c b/src/casetab.c index 4b29c091ca9..6097299047a 100644 --- a/src/casetab.c +++ b/src/casetab.c @@ -128,13 +128,13 @@ set_case_table (Lisp_Object table, int standard) up = Fmake_char_table (Qcase_table, Qnil); map_char_table (set_identity, Qnil, table, up); map_char_table (shuffle, Qnil, table, up); - XCHAR_TABLE (table)->extras[0] = up; + char_table_set_extras (table, 0, up); } if (NILP (canon)) { canon = Fmake_char_table (Qcase_table, Qnil); - XCHAR_TABLE (table)->extras[1] = canon; + char_table_set_extras (table, 1, canon); map_char_table (set_canon, Qnil, table, table); } @@ -143,11 +143,11 @@ set_case_table (Lisp_Object table, int standard) eqv = Fmake_char_table (Qcase_table, Qnil); map_char_table (set_identity, Qnil, canon, eqv); map_char_table (shuffle, Qnil, canon, eqv); - XCHAR_TABLE (table)->extras[2] = eqv; + char_table_set_extras (table, 2, eqv); } /* This is so set_image_of_range_1 in regex.c can find the EQV table. */ - XCHAR_TABLE (canon)->extras[2] = eqv; + char_table_set_extras (canon, 2, eqv); if (standard) { @@ -260,7 +260,7 @@ init_casetab_once (void) down = Fmake_char_table (Qcase_table, Qnil); Vascii_downcase_table = down; - XCHAR_TABLE (down)->purpose = Qcase_table; + CSET (XCHAR_TABLE (down), purpose, Qcase_table); for (i = 0; i < 128; i++) { @@ -268,10 +268,10 @@ init_casetab_once (void) CHAR_TABLE_SET (down, i, make_number (c)); } - XCHAR_TABLE (down)->extras[1] = Fcopy_sequence (down); + char_table_set_extras (down, 1, Fcopy_sequence (down)); up = Fmake_char_table (Qcase_table, Qnil); - XCHAR_TABLE (down)->extras[0] = up; + char_table_set_extras (down, 0, up); for (i = 0; i < 128; i++) { @@ -281,7 +281,7 @@ init_casetab_once (void) CHAR_TABLE_SET (up, i, make_number (c)); } - XCHAR_TABLE (down)->extras[2] = Fcopy_sequence (up); + char_table_set_extras (down, 2, Fcopy_sequence (up)); /* Fill in what isn't filled in. */ set_case_table (down, 1); |