Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
4c920633
Commit
4c920633
authored
Jun 29, 1997
by
Richard M. Stallman
Browse files
(scan_sexps_forward): Split up a complex if-test.
parent
03407632
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
src/syntax.c
src/syntax.c
+18
-4
No files found.
src/syntax.c
View file @
4c920633
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment