summaryrefslogtreecommitdiff
path: root/src/category.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/category.c')
-rw-r--r--src/category.c51
1 files changed, 25 insertions, 26 deletions
diff --git a/src/category.c b/src/category.c
index dddb1b79aba..c504d2d9921 100644
--- a/src/category.c
+++ b/src/category.c
@@ -103,7 +103,7 @@ those categories. */)
while (--len >= 0)
{
unsigned char cat = SREF (categories, len);
- Lisp_Object category = make_number (cat);
+ Lisp_Object category = make_fixnum (cat);
CHECK_CATEGORY (category);
set_category_set (val, cat, 1);
@@ -130,11 +130,11 @@ the current buffer's category table. */)
CHECK_STRING (docstring);
table = check_category_table (table);
- if (!NILP (CATEGORY_DOCSTRING (table, XFASTINT (category))))
- error ("Category `%c' is already defined", (int) XFASTINT (category));
+ if (!NILP (CATEGORY_DOCSTRING (table, XFIXNAT (category))))
+ error ("Category `%c' is already defined", (int) XFIXNAT (category));
if (!NILP (Vpurify_flag))
docstring = Fpurecopy (docstring);
- SET_CATEGORY_DOCSTRING (table, XFASTINT (category), docstring);
+ SET_CATEGORY_DOCSTRING (table, XFIXNAT (category), docstring);
return Qnil;
}
@@ -148,7 +148,7 @@ category table. */)
CHECK_CATEGORY (category);
table = check_category_table (table);
- return CATEGORY_DOCSTRING (table, XFASTINT (category));
+ return CATEGORY_DOCSTRING (table, XFIXNAT (category));
}
DEFUN ("get-unused-category", Fget_unused_category, Sget_unused_category,
@@ -165,7 +165,7 @@ it defaults to the current buffer's category table. */)
for (i = ' '; i <= '~'; i++)
if (NILP (CATEGORY_DOCSTRING (table, i)))
- return make_number (i);
+ return make_fixnum (i);
return Qnil;
}
@@ -220,9 +220,9 @@ copy_category_entry (Lisp_Object table, Lisp_Object c, Lisp_Object val)
{
val = Fcopy_sequence (val);
if (CONSP (c))
- char_table_set_range (table, XINT (XCAR (c)), XINT (XCDR (c)), val);
+ char_table_set_range (table, XFIXNUM (XCAR (c)), XFIXNUM (XCDR (c)), val);
else
- char_table_set (table, XINT (c), val);
+ char_table_set (table, XFIXNUM (c), val);
}
/* Return a copy of category table TABLE. We can't simply use the
@@ -271,8 +271,7 @@ DEFUN ("make-category-table", Fmake_category_table, Smake_category_table,
set_char_table_defalt (val, MAKE_CATEGORY_SET);
for (i = 0; i < (1 << CHARTAB_SIZE_BITS_0); i++)
set_char_table_contents (val, i, MAKE_CATEGORY_SET);
- Fset_char_table_extra_slot (val, make_number (0),
- Fmake_vector (make_number (95), Qnil));
+ Fset_char_table_extra_slot (val, make_fixnum (0), make_nil_vector (95));
return val;
}
@@ -303,7 +302,7 @@ usage: (char-category-set CHAR) */)
(Lisp_Object ch)
{
CHECK_CHARACTER (ch);
- return CATEGORY_SET (XFASTINT (ch));
+ return CATEGORY_SET (XFIXNAT (ch));
}
DEFUN ("category-set-mnemonics", Fcategory_set_mnemonics,
@@ -346,25 +345,25 @@ then delete CATEGORY from the category set instead of adding it. */)
int start, end;
int from, to;
- if (INTEGERP (character))
+ if (FIXNUMP (character))
{
CHECK_CHARACTER (character);
- start = end = XFASTINT (character);
+ start = end = XFIXNAT (character);
}
else
{
CHECK_CONS (character);
CHECK_CHARACTER_CAR (character);
CHECK_CHARACTER_CDR (character);
- start = XFASTINT (XCAR (character));
- end = XFASTINT (XCDR (character));
+ start = XFIXNAT (XCAR (character));
+ end = XFIXNAT (XCDR (character));
}
CHECK_CATEGORY (category);
table = check_category_table (table);
- if (NILP (CATEGORY_DOCSTRING (table, XFASTINT (category))))
- error ("Undefined category: %c", (int) XFASTINT (category));
+ if (NILP (CATEGORY_DOCSTRING (table, XFIXNAT (category))))
+ error ("Undefined category: %c", (int) XFIXNAT (category));
set_value = NILP (reset);
@@ -372,10 +371,10 @@ then delete CATEGORY from the category set instead of adding it. */)
{
from = start, to = end;
category_set = char_table_ref_and_range (table, start, &from, &to);
- if (CATEGORY_MEMBER (XFASTINT (category), category_set) != NILP (reset))
+ if (CATEGORY_MEMBER (XFIXNAT (category), category_set) != NILP (reset))
{
category_set = Fcopy_sequence (category_set);
- set_category_set (category_set, XFASTINT (category), set_value);
+ set_category_set (category_set, XFIXNAT (category), set_value);
category_set = hash_get_category_set (table, category_set);
char_table_set_range (table, start, to, category_set);
}
@@ -423,12 +422,12 @@ word_boundary_p (int c1, int c2)
if (CONSP (elt)
&& (NILP (XCAR (elt))
|| (CATEGORYP (XCAR (elt))
- && CATEGORY_MEMBER (XFASTINT (XCAR (elt)), category_set1)
- && ! CATEGORY_MEMBER (XFASTINT (XCAR (elt)), category_set2)))
+ && CATEGORY_MEMBER (XFIXNAT (XCAR (elt)), category_set1)
+ && ! CATEGORY_MEMBER (XFIXNAT (XCAR (elt)), category_set2)))
&& (NILP (XCDR (elt))
|| (CATEGORYP (XCDR (elt))
- && ! CATEGORY_MEMBER (XFASTINT (XCDR (elt)), category_set1)
- && CATEGORY_MEMBER (XFASTINT (XCDR (elt)), category_set2))))
+ && ! CATEGORY_MEMBER (XFIXNAT (XCDR (elt)), category_set1)
+ && CATEGORY_MEMBER (XFIXNAT (XCDR (elt)), category_set2))))
return !default_result;
}
return default_result;
@@ -440,13 +439,13 @@ init_category_once (void)
{
/* This has to be done here, before we call Fmake_char_table. */
DEFSYM (Qcategory_table, "category-table");
- Fput (Qcategory_table, Qchar_table_extra_slots, make_number (2));
+ Fput (Qcategory_table, Qchar_table_extra_slots, make_fixnum (2));
Vstandard_category_table = Fmake_char_table (Qcategory_table, Qnil);
/* Set a category set which contains nothing to the default. */
set_char_table_defalt (Vstandard_category_table, MAKE_CATEGORY_SET);
- Fset_char_table_extra_slot (Vstandard_category_table, make_number (0),
- Fmake_vector (make_number (95), Qnil));
+ Fset_char_table_extra_slot (Vstandard_category_table, make_fixnum (0),
+ make_nil_vector (95));
}
void