along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
-#include <setjmp.h>
+
#include "lisp.h"
-#include "buffer.h"
#include "character.h"
+#include "buffer.h"
static Lisp_Object Qcase_table_p, Qcase_table;
Lisp_Object Vascii_downcase_table;
return Vascii_downcase_table;
}
-static Lisp_Object set_case_table (Lisp_Object table, int standard);
+static Lisp_Object set_case_table (Lisp_Object, bool);
DEFUN ("set-case-table", Fset_case_table, Sset_case_table, 1, 1, 0,
doc: /* Select a new case table for the current buffer.
}
static Lisp_Object
-set_case_table (Lisp_Object table, int standard)
+set_case_table (Lisp_Object table, bool standard)
{
Lisp_Object up, canon, eqv;
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;
+ set_char_table_extras (table, 0, up);
}
if (NILP (canon))
{
canon = Fmake_char_table (Qcase_table, Qnil);
- XCHAR_TABLE (table)->extras[1] = canon;
+ set_char_table_extras (table, 1, canon);
map_char_table (set_canon, Qnil, table, table);
}
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;
+ set_char_table_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;
+ set_char_table_extras (canon, 2, eqv);
if (standard)
{
}
else
{
- BVAR (current_buffer, downcase_table) = table;
- BVAR (current_buffer, upcase_table) = up;
- BVAR (current_buffer, case_canon_table) = canon;
- BVAR (current_buffer, case_eqv_table) = eqv;
+ bset_downcase_table (current_buffer, table);
+ bset_upcase_table (current_buffer, up);
+ bset_case_canon_table (current_buffer, canon);
+ bset_case_eqv_table (current_buffer, eqv);
}
return table;
down = Fmake_char_table (Qcase_table, Qnil);
Vascii_downcase_table = down;
- XCHAR_TABLE (down)->purpose = Qcase_table;
+ set_char_table_purpose (down, Qcase_table);
for (i = 0; i < 128; i++)
{
CHAR_TABLE_SET (down, i, make_number (c));
}
- XCHAR_TABLE (down)->extras[1] = Fcopy_sequence (down);
+ set_char_table_extras (down, 1, Fcopy_sequence (down));
up = Fmake_char_table (Qcase_table, Qnil);
- XCHAR_TABLE (down)->extras[0] = up;
+ set_char_table_extras (down, 0, up);
for (i = 0; i < 128; i++)
{
CHAR_TABLE_SET (up, i, make_number (c));
}
- XCHAR_TABLE (down)->extras[2] = Fcopy_sequence (up);
+ set_char_table_extras (down, 2, Fcopy_sequence (up));
/* Fill in what isn't filled in. */
set_case_table (down, 1);