diff options
Diffstat (limited to 'src/syntax.c')
-rw-r--r-- | src/syntax.c | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/src/syntax.c b/src/syntax.c index c5a4b03955b..8434f47a5f7 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -490,7 +490,7 @@ parse_sexp_propertize (ptrdiff_t charpos) { EMACS_INT modiffs = CHARS_MODIFF; safe_call1 (Qinternal__syntax_propertize, - make_number (min (zv, 1 + charpos))); + make_fixnum (min (zv, 1 + charpos))); if (modiffs != CHARS_MODIFF) error ("parse-sexp-propertize-function modified the buffer!"); if (syntax_propertize__done <= charpos @@ -608,12 +608,12 @@ find_defun_start (ptrdiff_t pos, ptrdiff_t pos_byte) if (!NILP (Vcomment_use_syntax_ppss)) { EMACS_INT modiffs = CHARS_MODIFF; - Lisp_Object ppss = call1 (Qsyntax_ppss, make_number (pos)); + Lisp_Object ppss = call1 (Qsyntax_ppss, make_fixnum (pos)); if (modiffs != CHARS_MODIFF) error ("syntax-ppss modified the buffer!"); TEMP_SET_PT_BOTH (opoint, opoint_byte); - Lisp_Object boc = Fnth (make_number (8), ppss); - if (NUMBERP (boc)) + Lisp_Object boc = Fnth (make_fixnum (8), ppss); + if (FIXED_OR_FLOATP (boc)) { find_start_value = XINT (boc); find_start_value_byte = CHAR_TO_BYTE (find_start_value); @@ -1120,7 +1120,7 @@ this is probably the wrong function to use, because it can't take CHECK_CHARACTER (character); char_int = XINT (character); SETUP_BUFFER_SYNTAX_TABLE (); - return make_number (syntax_code_spec[SYNTAX (char_int)]); + return make_fixnum (syntax_code_spec[SYNTAX (char_int)]); } DEFUN ("matching-paren", Fmatching_paren, Smatching_paren, 1, 1, 0, @@ -1212,7 +1212,7 @@ the value of a `syntax-table' text property. */) return AREF (Vsyntax_code_object, val); else /* Since we can't use a shared object, let's make a new one. */ - return Fcons (make_number (val), match); + return Fcons (make_fixnum (val), match); } /* I really don't know why this is interactive @@ -1319,7 +1319,7 @@ DEFUN ("internal-describe-syntax-value", Finternal_describe_syntax_value, first = XCAR (value); match_lisp = XCDR (value); - if (!INTEGERP (first) || !(NILP (match_lisp) || CHARACTERP (match_lisp))) + if (!FIXNUMP (first) || !(NILP (match_lisp) || CHARACTERP (match_lisp))) { insert_string ("invalid"); return syntax; @@ -1480,8 +1480,8 @@ scan_words (ptrdiff_t from, EMACS_INT count) func = CHAR_TABLE_REF (Vfind_word_boundary_function_table, ch0); if (! NILP (Ffboundp (func))) { - pos = call2 (func, make_number (from - 1), make_number (end)); - if (INTEGERP (pos) && from < XINT (pos) && XINT (pos) <= ZV) + pos = call2 (func, make_fixnum (from - 1), make_fixnum (end)); + if (FIXNUMP (pos) && from < XINT (pos) && XINT (pos) <= ZV) { from = XINT (pos); from_byte = CHAR_TO_BYTE (from); @@ -1529,8 +1529,8 @@ scan_words (ptrdiff_t from, EMACS_INT count) func = CHAR_TABLE_REF (Vfind_word_boundary_function_table, ch1); if (! NILP (Ffboundp (func))) { - pos = call2 (func, make_number (from), make_number (beg)); - if (INTEGERP (pos) && BEGV <= XINT (pos) && XINT (pos) < from) + pos = call2 (func, make_fixnum (from), make_fixnum (beg)); + if (FIXNUMP (pos) && BEGV <= XINT (pos) && XINT (pos) < from) { from = XINT (pos); from_byte = CHAR_TO_BYTE (from); @@ -1586,14 +1586,14 @@ instead. See Info node `(elisp) Word Motion' for details. */) if (NILP (arg)) XSETFASTINT (arg, 1); else - CHECK_NUMBER (arg); + CHECK_FIXNUM (arg); val = orig_val = scan_words (PT, XINT (arg)); if (! orig_val) val = XINT (arg) > 0 ? ZV : BEGV; /* Avoid jumping out of an input field. */ - tmp = Fconstrain_to_field (make_number (val), make_number (PT), + tmp = Fconstrain_to_field (make_fixnum (val), make_fixnum (PT), Qnil, Qnil, Qnil); val = XFASTINT (tmp); @@ -1676,7 +1676,7 @@ skip_chars (bool forwardp, Lisp_Object string, Lisp_Object lim, if (NILP (lim)) XSETINT (lim, forwardp ? ZV : BEGV); else - CHECK_NUMBER_COERCE_MARKER (lim); + CHECK_FIXNUM_COERCE_MARKER (lim); /* In any case, don't allow scan outside bounds of buffer. */ if (XINT (lim) > ZV) @@ -1721,7 +1721,7 @@ skip_chars (bool forwardp, Lisp_Object string, Lisp_Object lim, error ("Invalid ISO C character class"); if (cc != -1) { - iso_classes = Fcons (make_number (cc), iso_classes); + iso_classes = Fcons (make_fixnum (cc), iso_classes); i_byte = ch - str; continue; } @@ -1817,7 +1817,7 @@ skip_chars (bool forwardp, Lisp_Object string, Lisp_Object lim, error ("Invalid ISO C character class"); if (cc != -1) { - iso_classes = Fcons (make_number (cc), iso_classes); + iso_classes = Fcons (make_fixnum (cc), iso_classes); i_byte = ch - str; continue; } @@ -2094,7 +2094,7 @@ skip_chars (bool forwardp, Lisp_Object string, Lisp_Object lim, SET_PT_BOTH (pos, pos_byte); SAFE_FREE (); - return make_number (PT - start_point); + return make_fixnum (PT - start_point); } } @@ -2115,7 +2115,7 @@ skip_syntaxes (bool forwardp, Lisp_Object string, Lisp_Object lim) if (NILP (lim)) XSETINT (lim, forwardp ? ZV : BEGV); else - CHECK_NUMBER_COERCE_MARKER (lim); + CHECK_FIXNUM_COERCE_MARKER (lim); /* In any case, don't allow scan outside bounds of buffer. */ if (XINT (lim) > ZV) @@ -2124,7 +2124,7 @@ skip_syntaxes (bool forwardp, Lisp_Object string, Lisp_Object lim) XSETFASTINT (lim, BEGV); if (forwardp ? (PT >= XFASTINT (lim)) : (PT <= XFASTINT (lim))) - return make_number (0); + return make_fixnum (0); multibyte = (!NILP (BVAR (current_buffer, enable_multibyte_characters)) && (XINT (lim) - PT != CHAR_TO_BYTE (XINT (lim)) - PT_BYTE)); @@ -2256,7 +2256,7 @@ skip_syntaxes (bool forwardp, Lisp_Object string, Lisp_Object lim) done: SET_PT_BOTH (pos, pos_byte); - return make_number (PT - start_point); + return make_fixnum (PT - start_point); } } @@ -2442,7 +2442,7 @@ between them, return t; otherwise return nil. */) int dummy2; unsigned short int quit_count = 0; - CHECK_NUMBER (count); + CHECK_FIXNUM (count); count1 = XINT (count); stop = count1 > 0 ? ZV : BEGV; @@ -2793,7 +2793,7 @@ scan_lists (EMACS_INT from, EMACS_INT count, EMACS_INT depth, bool sexpflag) if (depth < min_depth) xsignal3 (Qscan_error, build_string ("Containing expression ends prematurely"), - make_number (last_good), make_number (from)); + make_fixnum (last_good), make_fixnum (from)); break; case Sstring: @@ -2949,7 +2949,7 @@ scan_lists (EMACS_INT from, EMACS_INT count, EMACS_INT depth, bool sexpflag) if (depth < min_depth) xsignal3 (Qscan_error, build_string ("Containing expression ends prematurely"), - make_number (last_good), make_number (from)); + make_fixnum (last_good), make_fixnum (from)); break; case Sendcomment: @@ -3029,7 +3029,7 @@ scan_lists (EMACS_INT from, EMACS_INT count, EMACS_INT depth, bool sexpflag) lose: xsignal3 (Qscan_error, build_string ("Unbalanced parentheses"), - make_number (last_good), make_number (from)); + make_fixnum (last_good), make_fixnum (from)); } DEFUN ("scan-lists", Fscan_lists, Sscan_lists, 3, 3, 0, @@ -3053,9 +3053,9 @@ before we have scanned over COUNT lists, return nil if the depth at that point is zero, and signal an error if the depth is nonzero. */) (Lisp_Object from, Lisp_Object count, Lisp_Object depth) { - CHECK_NUMBER (from); - CHECK_NUMBER (count); - CHECK_NUMBER (depth); + CHECK_FIXNUM (from); + CHECK_FIXNUM (count); + CHECK_FIXNUM (depth); return scan_lists (XINT (from), XINT (count), XINT (depth), 0); } @@ -3073,8 +3073,8 @@ If the beginning or end is reached between groupings but before count is used up, nil is returned. */) (Lisp_Object from, Lisp_Object count) { - CHECK_NUMBER (from); - CHECK_NUMBER (count); + CHECK_FIXNUM (from); + CHECK_FIXNUM (count); return scan_lists (XINT (from), XINT (count), 0, 1); } @@ -3216,7 +3216,7 @@ do { prev_from = from; \ while (!NILP (tem)) /* >= second enclosing sexps. */ { Lisp_Object temhd = Fcar (tem); - if (RANGED_INTEGERP (PTRDIFF_MIN, temhd, PTRDIFF_MAX)) + if (RANGED_FIXNUMP (PTRDIFF_MIN, temhd, PTRDIFF_MAX)) curlevel->last = XINT (temhd); if (++curlevel == endlevel) curlevel--; /* error ("Nesting too deep for parser"); */ @@ -3462,7 +3462,7 @@ do { prev_from = from; \ state->location_byte = from_byte; state->levelstarts = Qnil; while (curlevel > levelstart) - state->levelstarts = Fcons (make_number ((--curlevel)->last), + state->levelstarts = Fcons (make_fixnum ((--curlevel)->last), state->levelstarts); state->prev_syntax = (SYNTAX_FLAGS_COMSTARTEND_FIRST (prev_from_syntax) || state->quoted) ? prev_from_syntax : Smax; @@ -3506,7 +3506,7 @@ internalize_parse_state (Lisp_Object external, struct lisp_parse_state *state) external = Fcdr (external); tem = Fcar (external); state->incomment = (!NILP (tem) - ? (INTEGERP (tem) ? XINT (tem) : -1) + ? (FIXNUMP (tem) ? XINT (tem) : -1) : 0); external = Fcdr (external); @@ -3520,14 +3520,14 @@ internalize_parse_state (Lisp_Object external, struct lisp_parse_state *state) tem = Fcar (external); state->comstyle = (NILP (tem) ? 0 - : (RANGED_INTEGERP (0, tem, ST_COMMENT_STYLE) + : (RANGED_FIXNUMP (0, tem, ST_COMMENT_STYLE) ? XINT (tem) : ST_COMMENT_STYLE)); external = Fcdr (external); tem = Fcar (external); state->comstr_start = - RANGED_INTEGERP (PTRDIFF_MIN, tem, PTRDIFF_MAX) ? XINT (tem) : -1; + RANGED_FIXNUMP (PTRDIFF_MIN, tem, PTRDIFF_MAX) ? XINT (tem) : -1; external = Fcdr (external); tem = Fcar (external); state->levelstarts = tem; @@ -3583,7 +3583,7 @@ Sixth arg COMMENTSTOP non-nil means stop after the start of a comment. if (!NILP (targetdepth)) { - CHECK_NUMBER (targetdepth); + CHECK_FIXNUM (targetdepth); target = XINT (targetdepth); } else @@ -3600,32 +3600,32 @@ Sixth arg COMMENTSTOP non-nil means stop after the start of a comment. SET_PT_BOTH (state.location, state.location_byte); return - Fcons (make_number (state.depth), + Fcons (make_fixnum (state.depth), Fcons (state.prevlevelstart < 0 - ? Qnil : make_number (state.prevlevelstart), + ? Qnil : make_fixnum (state.prevlevelstart), Fcons (state.thislevelstart < 0 - ? Qnil : make_number (state.thislevelstart), + ? Qnil : make_fixnum (state.thislevelstart), Fcons (state.instring >= 0 ? (state.instring == ST_STRING_STYLE - ? Qt : make_number (state.instring)) : Qnil, + ? Qt : make_fixnum (state.instring)) : Qnil, Fcons (state.incomment < 0 ? Qt : (state.incomment == 0 ? Qnil : - make_number (state.incomment)), + make_fixnum (state.incomment)), Fcons (state.quoted ? Qt : Qnil, - Fcons (make_number (state.mindepth), + Fcons (make_fixnum (state.mindepth), Fcons ((state.comstyle ? (state.comstyle == ST_COMMENT_STYLE ? Qsyntax_table - : make_number (state.comstyle)) + : make_fixnum (state.comstyle)) : Qnil), Fcons (((state.incomment || (state.instring >= 0)) - ? make_number (state.comstr_start) + ? make_fixnum (state.comstr_start) : Qnil), Fcons (state.levelstarts, Fcons (state.prev_syntax == Smax ? Qnil - : make_number (state.prev_syntax), + : make_fixnum (state.prev_syntax), Qnil))))))))))); } @@ -3641,11 +3641,11 @@ init_syntax_once (void) /* Create objects which can be shared among syntax tables. */ Vsyntax_code_object = make_uninit_vector (Smax); for (i = 0; i < Smax; i++) - ASET (Vsyntax_code_object, i, Fcons (make_number (i), Qnil)); + ASET (Vsyntax_code_object, i, Fcons (make_fixnum (i), Qnil)); /* Now we are ready to set up this property, so we can create syntax tables. */ - Fput (Qsyntax_table, Qchar_table_extra_slots, make_number (0)); + Fput (Qsyntax_table, Qchar_table_extra_slots, make_fixnum (0)); temp = AREF (Vsyntax_code_object, Swhitespace); @@ -3677,21 +3677,21 @@ init_syntax_once (void) SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, '%', temp); SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, '(', - Fcons (make_number (Sopen), make_number (')'))); + Fcons (make_fixnum (Sopen), make_fixnum (')'))); SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, ')', - Fcons (make_number (Sclose), make_number ('('))); + Fcons (make_fixnum (Sclose), make_fixnum ('('))); SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, '[', - Fcons (make_number (Sopen), make_number (']'))); + Fcons (make_fixnum (Sopen), make_fixnum (']'))); SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, ']', - Fcons (make_number (Sclose), make_number ('['))); + Fcons (make_fixnum (Sclose), make_fixnum ('['))); SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, '{', - Fcons (make_number (Sopen), make_number ('}'))); + Fcons (make_fixnum (Sopen), make_fixnum ('}'))); SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, '}', - Fcons (make_number (Sclose), make_number ('{'))); + Fcons (make_fixnum (Sclose), make_fixnum ('{'))); SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, '"', - Fcons (make_number (Sstring), Qnil)); + Fcons (make_fixnum (Sstring), Qnil)); SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, '\\', - Fcons (make_number (Sescape), Qnil)); + Fcons (make_fixnum (Sescape), Qnil)); temp = AREF (Vsyntax_code_object, Ssymbol); for (i = 0; i < 10; i++) |