diff options
| author | Richard M. Stallman <rms@gnu.org> | 1997-06-29 00:33:39 +0000 |
|---|---|---|
| committer | Richard M. Stallman <rms@gnu.org> | 1997-06-29 00:33:39 +0000 |
| commit | 4c9206330167bcbc353eb066e3fc81b97d698097 (patch) | |
| tree | 98000577a5e4d0631c11f551060db49d1b3ca12d | |
| parent | 03407632d251fecb87ea6e1ea7c59bed8e5e67e9 (diff) | |
| download | emacs-4c9206330167bcbc353eb066e3fc81b97d698097.tar.gz | |
(scan_sexps_forward): Split up a complex if-test.
| -rw-r--r-- | src/syntax.c | 22 |
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, UPDATE_SYNTAX_TABLE_FORWARD (from); code = SYNTAX (FETCH_CHAR (from)); INC_FROM; + if (code == Scomment) state.comstr_start = prev_from; - - else if (code == Scomment_fence - || (from < end && SYNTAX_COMSTART_FIRST (FETCH_CHAR (prev_from)) - && SYNTAX_COMSTART_SECOND (FETCH_CHAR (from)))) + else if (code == Scomment_fence) { /* Record the comment style we have entered so that only the comment-end sequence of the same style actually @@ -2431,6 +2429,22 @@ scan_sexps_forward (stateptr, from, end, targetdepth, if (code != Scomment_fence) INC_FROM; code = Scomment; } + else if (from < end) + if (SYNTAX_COMSTART_FIRST (FETCH_CHAR (prev_from))) + if (SYNTAX_COMSTART_SECOND (FETCH_CHAR (from))) + /* Duplicate code to avoid a very complex if-expression + which causes trouble for the SGI compiler. */ + { + /* Record the comment style we have entered so that only + the comment-end sequence of the same style actually + terminates the comment section. */ + state.comstyle = ( code == Scomment_fence + ? ST_COMMENT_STYLE + : SYNTAX_COMMENT_STYLE (FETCH_CHAR (from))); + state.comstr_start = prev_from; + if (code != Scomment_fence) INC_FROM; + code = Scomment; + } if (SYNTAX_PREFIX (FETCH_CHAR (prev_from))) continue; |
