aboutsummaryrefslogtreecommitdiffstats
path: root/src/syntax.c
diff options
context:
space:
mode:
authorRichard M. Stallman1997-06-29 00:33:39 +0000
committerRichard M. Stallman1997-06-29 00:33:39 +0000
commit4c9206330167bcbc353eb066e3fc81b97d698097 (patch)
tree98000577a5e4d0631c11f551060db49d1b3ca12d /src/syntax.c
parent03407632d251fecb87ea6e1ea7c59bed8e5e67e9 (diff)
downloademacs-4c9206330167bcbc353eb066e3fc81b97d698097.tar.gz
emacs-4c9206330167bcbc353eb066e3fc81b97d698097.zip
(scan_sexps_forward): Split up a complex if-test.
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/syntax.c b/src/syntax.c
index 0df8851c0bd..4a60e1e0267 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -2414,12 +2414,10 @@ scan_sexps_forward (stateptr, from, end, targetdepth,
2414 UPDATE_SYNTAX_TABLE_FORWARD (from); 2414 UPDATE_SYNTAX_TABLE_FORWARD (from);
2415 code = SYNTAX (FETCH_CHAR (from)); 2415 code = SYNTAX (FETCH_CHAR (from));
2416 INC_FROM; 2416 INC_FROM;
2417
2417 if (code == Scomment) 2418 if (code == Scomment)
2418 state.comstr_start = prev_from; 2419 state.comstr_start = prev_from;
2419 2420 else if (code == Scomment_fence)
2420 else if (code == Scomment_fence
2421 || (from < end && SYNTAX_COMSTART_FIRST (FETCH_CHAR (prev_from))
2422 && SYNTAX_COMSTART_SECOND (FETCH_CHAR (from))))
2423 { 2421 {
2424 /* Record the comment style we have entered so that only 2422 /* Record the comment style we have entered so that only
2425 the comment-end sequence of the same style actually 2423 the comment-end sequence of the same style actually
@@ -2431,6 +2429,22 @@ scan_sexps_forward (stateptr, from, end, targetdepth,
2431 if (code != Scomment_fence) INC_FROM; 2429 if (code != Scomment_fence) INC_FROM;
2432 code = Scomment; 2430 code = Scomment;
2433 } 2431 }
2432 else if (from < end)
2433 if (SYNTAX_COMSTART_FIRST (FETCH_CHAR (prev_from)))
2434 if (SYNTAX_COMSTART_SECOND (FETCH_CHAR (from)))
2435 /* Duplicate code to avoid a very complex if-expression
2436 which causes trouble for the SGI compiler. */
2437 {
2438 /* Record the comment style we have entered so that only
2439 the comment-end sequence of the same style actually
2440 terminates the comment section. */
2441 state.comstyle = ( code == Scomment_fence
2442 ? ST_COMMENT_STYLE
2443 : SYNTAX_COMMENT_STYLE (FETCH_CHAR (from)));
2444 state.comstr_start = prev_from;
2445 if (code != Scomment_fence) INC_FROM;
2446 code = Scomment;
2447 }
2434 2448
2435 if (SYNTAX_PREFIX (FETCH_CHAR (prev_from))) 2449 if (SYNTAX_PREFIX (FETCH_CHAR (prev_from)))
2436 continue; 2450 continue;