X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/8546720e6f25eb988e8215de6678798053031440..4170f62f39edf1ff1e99aec9bfbfe7bbf10e7fc9:/src/syntax.c diff --git a/src/syntax.c b/src/syntax.c index 56176f3241..031409144b 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -95,12 +95,15 @@ along with GNU Emacs. If not, see . */ #define ST_COMMENT_STYLE (256 + 1) #define ST_STRING_STYLE (256 + 2) -Lisp_Object Qsyntax_table_p, Qsyntax_table, Qscan_error; +static Lisp_Object Qsyntax_table_p; +static Lisp_Object Qsyntax_table, Qscan_error; +#ifndef __GNUC__ /* Used as a temporary in SYNTAX_ENTRY and other macros in syntax.h, if not compiled with GCC. No need to mark it, since it is used only very temporarily. */ Lisp_Object syntax_temp; +#endif /* This is the internal form of the parse state used in parse-partial-sexp. */ @@ -138,6 +141,7 @@ static EMACS_INT find_start_begv; static int find_start_modiff; +static Lisp_Object Fsyntax_table_p (Lisp_Object); static Lisp_Object skip_chars (int, Lisp_Object, Lisp_Object, int); static Lisp_Object skip_syntaxes (int, Lisp_Object, Lisp_Object); static Lisp_Object scan_lists (EMACS_INT, EMACS_INT, EMACS_INT, int); @@ -1366,8 +1370,6 @@ and the function returns nil. Field boundaries are not noticed if return val == orig_val ? Qt : Qnil; } -Lisp_Object skip_chars (int, Lisp_Object, Lisp_Object, int); - DEFUN ("skip-chars-forward", Fskip_chars_forward, Sskip_chars_forward, 1, 2, 0, doc: /* Move point forward, stopping before a char not in STRING, or at pos LIM. STRING is like the inside of a `[...]' in a regular expression @@ -1541,7 +1543,8 @@ skip_chars (int forwardp, Lisp_Object string, Lisp_Object lim, int handle_iso_cl if (c <= c2) { - while (c <= c2) + unsigned lim2 = c2 + 1; + while (c < lim2) fastmap[c++] = 1; if (! ASCII_CHAR_P (c2)) string_has_eight_bit = 1; @@ -1681,7 +1684,8 @@ skip_chars (int forwardp, Lisp_Object string, Lisp_Object lim, int handle_iso_cl } if (! ASCII_CHAR_P (c)) { - while (leading_code <= leading_code2) + unsigned lim2 = leading_code2 + 1; + while (leading_code < lim2) fastmap[leading_code++] = 1; if (c <= c2) { @@ -1713,9 +1717,9 @@ skip_chars (int forwardp, Lisp_Object string, Lisp_Object lim, int handle_iso_cl for (i = 0; i < n_char_ranges; i += 2) { int c1 = char_ranges[i]; - int c2 = char_ranges[i + 1]; + unsigned lim2 = char_ranges[i + 1] + 1; - for (; c1 <= c2; c1++) + for (; c1 < lim2; c1++) { int b = CHAR_TO_BYTE_SAFE (c1); if (b >= 0)