/* GNU Emacs routines to deal with syntax tables; also word and list parsing.
- Copyright (C) 1985, 1987, 1993-1995, 1997-1999, 2001-2011
+ Copyright (C) 1985, 1987, 1993-1995, 1997-1999, 2001-2012
Free Software Foundation, Inc.
This file is part of GNU Emacs.
#include <config.h>
+
#include <ctype.h>
+#include <sys/types.h>
#include <setjmp.h>
#include "lisp.h"
#include "commands.h"
/* Return the bytepos one character before BYTEPOS.
We assume that BYTEPOS is not at the start of the buffer. */
-static INLINE EMACS_INT
+static inline EMACS_INT
dec_bytepos (EMACS_INT bytepos)
{
if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
if (!open_paren_in_column_0_is_defun_start)
{
+ find_start_value = BEGV;
find_start_value_byte = BEGV_BYTE;
+ find_start_buffer = current_buffer;
+ find_start_modiff = MODIFF;
+ find_start_begv = BEGV;
+ find_start_pos = pos;
return BEGV;
}
break;
}
- if (val < XVECTOR (Vsyntax_code_object)->size && NILP (match))
+ if (val < ASIZE (Vsyntax_code_object) && NILP (match))
return XVECTOR (Vsyntax_code_object)->contents[val];
else
/* Since we can't use a shared object, let's make a new one. */
Lisp_Object temp;
/* This has to be done here, before we call Fmake_char_table. */
- Qsyntax_table = intern_c_string ("syntax-table");
- staticpro (&Qsyntax_table);
+ DEFSYM (Qsyntax_table, "syntax-table");
/* Intern_C_String this now in case it isn't already done.
Setting this variable twice is harmless.
/* Create objects which can be shared among syntax tables. */
Vsyntax_code_object = Fmake_vector (make_number (Smax), Qnil);
- for (i = 0; i < XVECTOR (Vsyntax_code_object)->size; i++)
+ for (i = 0; i < ASIZE (Vsyntax_code_object); i++)
XVECTOR (Vsyntax_code_object)->contents[i]
= Fcons (make_number (i), Qnil);
void
syms_of_syntax (void)
{
- Qsyntax_table_p = intern_c_string ("syntax-table-p");
- staticpro (&Qsyntax_table_p);
+ DEFSYM (Qsyntax_table_p, "syntax-table-p");
staticpro (&Vsyntax_code_object);
/* Defined in regex.c */
staticpro (&re_match_object);
- Qscan_error = intern_c_string ("scan-error");
- staticpro (&Qscan_error);
+ DEFSYM (Qscan_error, "scan-error");
Fput (Qscan_error, Qerror_conditions,
pure_cons (Qscan_error, pure_cons (Qerror, Qnil)));
Fput (Qscan_error, Qerror_message,