aboutsummaryrefslogtreecommitdiffstats
path: root/src/syntax.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c51
1 files changed, 15 insertions, 36 deletions
diff --git a/src/syntax.c b/src/syntax.c
index 4cead52f958..22620219335 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -109,7 +109,7 @@ static int in_classes (int, Lisp_Object);
109 109
110struct gl_state_s gl_state; /* Global state of syntax parser. */ 110struct gl_state_s gl_state; /* Global state of syntax parser. */
111 111
112INTERVAL interval_of (); 112INTERVAL interval_of (int, Lisp_Object);
113#define INTERVALS_AT_ONCE 10 /* 1 + max-number of intervals 113#define INTERVALS_AT_ONCE 10 /* 1 + max-number of intervals
114 to scan to property-change. */ 114 to scan to property-change. */
115 115
@@ -127,9 +127,7 @@ INTERVAL interval_of ();
127 start/end of OBJECT. */ 127 start/end of OBJECT. */
128 128
129void 129void
130update_syntax_table (charpos, count, init, object) 130update_syntax_table (int charpos, int count, int init, Lisp_Object object)
131 int charpos, count, init;
132 Lisp_Object object;
133{ 131{
134 Lisp_Object tmp_table; 132 Lisp_Object tmp_table;
135 int cnt = 0, invalidate = 1; 133 int cnt = 0, invalidate = 1;
@@ -318,8 +316,7 @@ char_quoted (EMACS_INT charpos, EMACS_INT bytepos)
318 We assume that BYTEPOS is not at the end of the buffer. */ 316 We assume that BYTEPOS is not at the end of the buffer. */
319 317
320INLINE EMACS_INT 318INLINE EMACS_INT
321inc_bytepos (bytepos) 319inc_bytepos (EMACS_INT bytepos)
322 EMACS_INT bytepos;
323{ 320{
324 if (NILP (current_buffer->enable_multibyte_characters)) 321 if (NILP (current_buffer->enable_multibyte_characters))
325 return bytepos + 1; 322 return bytepos + 1;
@@ -332,8 +329,7 @@ inc_bytepos (bytepos)
332 We assume that BYTEPOS is not at the start of the buffer. */ 329 We assume that BYTEPOS is not at the start of the buffer. */
333 330
334INLINE EMACS_INT 331INLINE EMACS_INT
335dec_bytepos (bytepos) 332dec_bytepos (EMACS_INT bytepos)
336 EMACS_INT bytepos;
337{ 333{
338 if (NILP (current_buffer->enable_multibyte_characters)) 334 if (NILP (current_buffer->enable_multibyte_characters))
339 return bytepos - 1; 335 return bytepos - 1;
@@ -357,8 +353,7 @@ dec_bytepos (bytepos)
357 update the global data. */ 353 update the global data. */
358 354
359static EMACS_INT 355static EMACS_INT
360find_defun_start (pos, pos_byte) 356find_defun_start (EMACS_INT pos, EMACS_INT pos_byte)
361 EMACS_INT pos, pos_byte;
362{ 357{
363 EMACS_INT opoint = PT, opoint_byte = PT_BYTE; 358 EMACS_INT opoint = PT, opoint_byte = PT_BYTE;
364 359
@@ -422,8 +417,7 @@ find_defun_start (pos, pos_byte)
422/* Return the SYNTAX_COMEND_FIRST of the character before POS, POS_BYTE. */ 417/* Return the SYNTAX_COMEND_FIRST of the character before POS, POS_BYTE. */
423 418
424static int 419static int
425prev_char_comend_first (pos, pos_byte) 420prev_char_comend_first (int pos, int pos_byte)
426 int pos, pos_byte;
427{ 421{
428 int c, val; 422 int c, val;
429 423
@@ -465,10 +459,7 @@ prev_char_comend_first (pos, pos_byte)
465 the returned value (or at FROM, if the search was not successful). */ 459 the returned value (or at FROM, if the search was not successful). */
466 460
467static int 461static int
468back_comment (from, from_byte, stop, comnested, comstyle, charpos_ptr, bytepos_ptr) 462back_comment (EMACS_INT from, EMACS_INT from_byte, EMACS_INT stop, int comnested, int comstyle, EMACS_INT *charpos_ptr, EMACS_INT *bytepos_ptr)
469 EMACS_INT from, from_byte, stop;
470 int comnested, comstyle;
471 EMACS_INT *charpos_ptr, *bytepos_ptr;
472{ 463{
473 /* Look back, counting the parity of string-quotes, 464 /* Look back, counting the parity of string-quotes,
474 and recording the comment-starters seen. 465 and recording the comment-starters seen.
@@ -740,8 +731,7 @@ Currently, any char-table counts as a syntax table. */)
740} 731}
741 732
742static void 733static void
743check_syntax_table (obj) 734check_syntax_table (Lisp_Object obj)
744 Lisp_Object obj;
745{ 735{
746 CHECK_TYPE (CHAR_TABLE_P (obj) && EQ (XCHAR_TABLE (obj)->purpose, Qsyntax_table), 736 CHECK_TYPE (CHAR_TABLE_P (obj) && EQ (XCHAR_TABLE (obj)->purpose, Qsyntax_table),
747 Qsyntax_table_p, obj); 737 Qsyntax_table_p, obj);
@@ -1185,8 +1175,7 @@ Lisp_Object Vfind_word_boundary_function_table;
1185 COUNT negative means scan backward and stop at word beginning. */ 1175 COUNT negative means scan backward and stop at word beginning. */
1186 1176
1187int 1177int
1188scan_words (from, count) 1178scan_words (register int from, register int count)
1189 register int from, count;
1190{ 1179{
1191 register int beg = BEGV; 1180 register int beg = BEGV;
1192 register int end = ZV; 1181 register int end = ZV;
@@ -1395,10 +1384,7 @@ This function returns the distance traveled, either zero or negative. */)
1395} 1384}
1396 1385
1397static Lisp_Object 1386static Lisp_Object
1398skip_chars (forwardp, string, lim, handle_iso_classes) 1387skip_chars (int forwardp, Lisp_Object string, Lisp_Object lim, int handle_iso_classes)
1399 int forwardp;
1400 Lisp_Object string, lim;
1401 int handle_iso_classes;
1402{ 1388{
1403 register unsigned int c; 1389 register unsigned int c;
1404 unsigned char fastmap[0400]; 1390 unsigned char fastmap[0400];
@@ -1892,9 +1878,7 @@ skip_chars (forwardp, string, lim, handle_iso_classes)
1892 1878
1893 1879
1894static Lisp_Object 1880static Lisp_Object
1895skip_syntaxes (forwardp, string, lim) 1881skip_syntaxes (int forwardp, Lisp_Object string, Lisp_Object lim)
1896 int forwardp;
1897 Lisp_Object string, lim;
1898{ 1882{
1899 register unsigned int c; 1883 register unsigned int c;
1900 unsigned char fastmap[0400]; 1884 unsigned char fastmap[0400];
@@ -2067,9 +2051,7 @@ skip_syntaxes (forwardp, string, lim)
2067 integer which is its type according to re_wctype. */ 2051 integer which is its type according to re_wctype. */
2068 2052
2069static int 2053static int
2070in_classes (c, iso_classes) 2054in_classes (int c, Lisp_Object iso_classes)
2071 int c;
2072 Lisp_Object iso_classes;
2073{ 2055{
2074 int fits_class = 0; 2056 int fits_class = 0;
2075 2057
@@ -2422,10 +2404,7 @@ between them, return t; otherwise return nil. */)
2422 ? SYNTAX (c) : Ssymbol) 2404 ? SYNTAX (c) : Ssymbol)
2423 2405
2424static Lisp_Object 2406static Lisp_Object
2425scan_lists (from, count, depth, sexpflag) 2407scan_lists (register EMACS_INT from, EMACS_INT count, EMACS_INT depth, int sexpflag)
2426 register EMACS_INT from;
2427 EMACS_INT count, depth;
2428 int sexpflag;
2429{ 2408{
2430 Lisp_Object val; 2409 Lisp_Object val;
2431 register EMACS_INT stop = count > 0 ? ZV : BEGV; 2410 register EMACS_INT stop = count > 0 ? ZV : BEGV;
@@ -3324,7 +3303,7 @@ Sixth arg COMMENTSTOP non-nil means stop at the start of a comment.
3324} 3303}
3325 3304
3326void 3305void
3327init_syntax_once () 3306init_syntax_once (void)
3328{ 3307{
3329 register int i, c; 3308 register int i, c;
3330 Lisp_Object temp; 3309 Lisp_Object temp;
@@ -3414,7 +3393,7 @@ init_syntax_once ()
3414} 3393}
3415 3394
3416void 3395void
3417syms_of_syntax () 3396syms_of_syntax (void)
3418{ 3397{
3419 Qsyntax_table_p = intern_c_string ("syntax-table-p"); 3398 Qsyntax_table_p = intern_c_string ("syntax-table-p");
3420 staticpro (&Qsyntax_table_p); 3399 staticpro (&Qsyntax_table_p);