Lisp_Object Qsyntax_table_p;
+static void scan_sexps_forward ();
+static int char_quoted ();
+
int words_include_escapes;
/* This is the internal form of the parse state used in parse-partial-sexp. */
table = check_syntax_table (table);
current_buffer->syntax_table = table;
/* Indicate that this buffer now has a specified syntax table. */
- current_buffer->local_var_flags |= buffer_local_flags.syntax_table;
+ current_buffer->local_var_flags
+ |= XFASTINT (buffer_local_flags.syntax_table);
return table;
}
\f
for make-docfile to see. We cannot put this in the real DEFUN
due to limits in the Unix cpp.
-DEFUN ("modify-syntax-entry", foo, bar, 0, 0, 0,
+DEFUN ("modify-syntax-entry", foo, bar, 2, 3, 0,
"Set syntax for character CHAR according to string S.\n\
The syntax is changed only for table TABLE, which defaults to\n\
the current buffer's syntax table.\n\
p means C is a prefix character for `backward-prefix-chars';\n\
such characters are treated as whitespace when they occur\n\
between expressions.")
-
+ (char, s, table)
*/
DEFUN ("modify-syntax-entry", Fmodify_syntax_entry, Smodify_syntax_entry, 2, 3,
\f
/* Dump syntax table to buffer in human-readable format */
+static void
describe_syntax (value)
Lisp_Object value;
{
insert_string ("\n");
}
-Lisp_Object
+static Lisp_Object
describe_syntax_1 (vector)
Lisp_Object vector;
{
if (code == Sendcomment && !quoted)
{
+#if 0
if (code != SYNTAX (c))
/* For a two-char comment ender, we can assume
it does end a comment. So scan back in a simple way. */
}
break;
}
+#endif /* 0 */
/* Look back, counting the parity of string-quotes,
and recording the comment-starters seen.
last passed a comment starter. */
struct lisp_parse_state state;
scan_sexps_forward (&state, find_defun_start (comment_end),
- comment_end - 1, -10000, 0, Qnil);
+ comment_end - 1, -10000, 0, Qnil, 0);
if (state.incomment)
from = state.comstart;
else
case Sendcomment:
if (!parse_sexp_ignore_comments)
break;
+#if 0
if (code != SYNTAX (c))
/* For a two-char comment ender, we can assume
it does end a comment. So scan back in a simple way. */
}
break;
}
+#endif /* 0 */
/* Look back, counting the parity of string-quotes,
and recording the comment-starters seen.
last passed a comment starter. */
struct lisp_parse_state state;
scan_sexps_forward (&state, find_defun_start (comment_end),
- comment_end - 1, -10000, 0, Qnil);
+ comment_end - 1, -10000, 0, Qnil, 0);
if (state.incomment)
from = state.comstart;
else
/* NOTREACHED */
}
+static int
char_quoted (pos)
register int pos;
{
If STOPBEFORE is nonzero, stop at the start of an atom.
If COMMENTSTOP is nonzero, stop at the start of a comment. */
+static void
scan_sexps_forward (stateptr, from, end, targetdepth,
stopbefore, oldstate, commentstop)
struct lisp_parse_state *stateptr;
{
code = SYNTAX (FETCH_CHAR (from));
from++;
- if (from < end && SYNTAX_COMSTART_FIRST (FETCH_CHAR (from - 1))
- && SYNTAX_COMSTART_SECOND (FETCH_CHAR (from)))
+ if (code == Scomment)
+ state.comstart = from-1;
+
+ else if (from < end && SYNTAX_COMSTART_FIRST (FETCH_CHAR (from - 1))
+ && SYNTAX_COMSTART_SECOND (FETCH_CHAR (from)))
{
/* Record the comment style we have entered so that only
the comment-end sequence of the same style actually
terminates the comment section. */
code = Scomment;
state.comstyle = SYNTAX_COMMENT_STYLE (FETCH_CHAR (from));
+ state.comstart = from-1;
from++;
}
case Scomment:
state.incomment = 1;
- state.comstart = from;
startincomment:
if (commentstop)
goto done;