diff options
Diffstat (limited to 'src/syntax.c')
| -rw-r--r-- | src/syntax.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/syntax.c b/src/syntax.c index 707c2c19f31..c1442c396c1 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -513,7 +513,7 @@ back_comment (EMACS_INT from, EMACS_INT from_byte, EMACS_INT stop, int comnested | |||
| 513 | EMACS_INT comment_end = from; | 513 | EMACS_INT comment_end = from; |
| 514 | EMACS_INT comment_end_byte = from_byte; | 514 | EMACS_INT comment_end_byte = from_byte; |
| 515 | EMACS_INT comstart_pos = 0; | 515 | EMACS_INT comstart_pos = 0; |
| 516 | EMACS_INT comstart_byte; | 516 | EMACS_INT comstart_byte IF_LINT (= 0); |
| 517 | /* Place where the containing defun starts, | 517 | /* Place where the containing defun starts, |
| 518 | or 0 if we didn't come across it yet. */ | 518 | or 0 if we didn't come across it yet. */ |
| 519 | EMACS_INT defun_start = 0; | 519 | EMACS_INT defun_start = 0; |
| @@ -554,7 +554,7 @@ back_comment (EMACS_INT from, EMACS_INT from_byte, EMACS_INT stop, int comnested | |||
| 554 | com2end = (SYNTAX_FLAGS_COMEND_FIRST (syntax) | 554 | com2end = (SYNTAX_FLAGS_COMEND_FIRST (syntax) |
| 555 | && SYNTAX_FLAGS_COMEND_SECOND (prev_syntax)); | 555 | && SYNTAX_FLAGS_COMEND_SECOND (prev_syntax)); |
| 556 | comstart = (com2start || code == Scomment); | 556 | comstart = (com2start || code == Scomment); |
| 557 | 557 | ||
| 558 | /* Nasty cases with overlapping 2-char comment markers: | 558 | /* Nasty cases with overlapping 2-char comment markers: |
| 559 | - snmp-mode: -- c -- foo -- c -- | 559 | - snmp-mode: -- c -- foo -- c -- |
| 560 | --- c -- | 560 | --- c -- |
| @@ -1421,7 +1421,7 @@ skip_chars (int forwardp, Lisp_Object string, Lisp_Object lim, int handle_iso_cl | |||
| 1421 | register unsigned int c; | 1421 | register unsigned int c; |
| 1422 | unsigned char fastmap[0400]; | 1422 | unsigned char fastmap[0400]; |
| 1423 | /* Store the ranges of non-ASCII characters. */ | 1423 | /* Store the ranges of non-ASCII characters. */ |
| 1424 | int *char_ranges; | 1424 | int *char_ranges IF_LINT (= NULL); |
| 1425 | int n_char_ranges = 0; | 1425 | int n_char_ranges = 0; |
| 1426 | int negate = 0; | 1426 | int negate = 0; |
| 1427 | register EMACS_INT i, i_byte; | 1427 | register EMACS_INT i, i_byte; |
| @@ -2363,7 +2363,7 @@ between them, return t; otherwise return nil. */) | |||
| 2363 | if (code == Scomment_fence) | 2363 | if (code == Scomment_fence) |
| 2364 | { | 2364 | { |
| 2365 | /* Skip until first preceding unquoted comment_fence. */ | 2365 | /* Skip until first preceding unquoted comment_fence. */ |
| 2366 | int found = 0; | 2366 | int fence_found = 0; |
| 2367 | EMACS_INT ini = from, ini_byte = from_byte; | 2367 | EMACS_INT ini = from, ini_byte = from_byte; |
| 2368 | 2368 | ||
| 2369 | while (1) | 2369 | while (1) |
| @@ -2374,13 +2374,13 @@ between them, return t; otherwise return nil. */) | |||
| 2374 | if (SYNTAX (c) == Scomment_fence | 2374 | if (SYNTAX (c) == Scomment_fence |
| 2375 | && !char_quoted (from, from_byte)) | 2375 | && !char_quoted (from, from_byte)) |
| 2376 | { | 2376 | { |
| 2377 | found = 1; | 2377 | fence_found = 1; |
| 2378 | break; | 2378 | break; |
| 2379 | } | 2379 | } |
| 2380 | else if (from == stop) | 2380 | else if (from == stop) |
| 2381 | break; | 2381 | break; |
| 2382 | } | 2382 | } |
| 2383 | if (found == 0) | 2383 | if (fence_found == 0) |
| 2384 | { | 2384 | { |
| 2385 | from = ini; /* Set point to ini + 1. */ | 2385 | from = ini; /* Set point to ini + 1. */ |
| 2386 | from_byte = ini_byte; | 2386 | from_byte = ini_byte; |
| @@ -2669,12 +2669,12 @@ scan_lists (register EMACS_INT from, EMACS_INT count, EMACS_INT depth, int sexpf | |||
| 2669 | /* We must record the comment style encountered so that | 2669 | /* We must record the comment style encountered so that |
| 2670 | later, we can match only the proper comment begin | 2670 | later, we can match only the proper comment begin |
| 2671 | sequence of the same style. */ | 2671 | sequence of the same style. */ |
| 2672 | int c1, other_syntax; | 2672 | int c2, other_syntax; |
| 2673 | DEC_BOTH (from, from_byte); | 2673 | DEC_BOTH (from, from_byte); |
| 2674 | UPDATE_SYNTAX_TABLE_BACKWARD (from); | 2674 | UPDATE_SYNTAX_TABLE_BACKWARD (from); |
| 2675 | code = Sendcomment; | 2675 | code = Sendcomment; |
| 2676 | c1 = FETCH_CHAR_AS_MULTIBYTE (from_byte); | 2676 | c2 = FETCH_CHAR_AS_MULTIBYTE (from_byte); |
| 2677 | other_syntax = SYNTAX_WITH_FLAGS (c1); | 2677 | other_syntax = SYNTAX_WITH_FLAGS (c2); |
| 2678 | comstyle = SYNTAX_FLAGS_COMMENT_STYLE (other_syntax, syntax); | 2678 | comstyle = SYNTAX_FLAGS_COMMENT_STYLE (other_syntax, syntax); |
| 2679 | comnested | 2679 | comnested |
| 2680 | = comnested || SYNTAX_FLAGS_COMMENT_NESTED (other_syntax); | 2680 | = comnested || SYNTAX_FLAGS_COMMENT_NESTED (other_syntax); |
| @@ -3528,4 +3528,3 @@ In both cases, LIMIT bounds the search. */); | |||
| 3528 | defsubr (&Sbackward_prefix_chars); | 3528 | defsubr (&Sbackward_prefix_chars); |
| 3529 | defsubr (&Sparse_partial_sexp); | 3529 | defsubr (&Sparse_partial_sexp); |
| 3530 | } | 3530 | } |
| 3531 | |||