aboutsummaryrefslogtreecommitdiffstats
path: root/src/syntax.c
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1994-06-16 15:03:04 +0000
committerRichard M. Stallman <[email protected]>1994-06-16 15:03:04 +0000
commitc01f7ec05de7ca645f6f5c6e84fe700eccf48f5c (patch)
tree6c8942fe9f87f4709c839173a07924a13b72fa9f /src/syntax.c
parent97c6019c1a1ff60e309221f1f8d78400dd9655a4 (diff)
(scan_lists): Get error if eob within comment with depth!=0.
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/syntax.c b/src/syntax.c
index 0db563c18e..d1dd293123 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -933,7 +933,12 @@ scan_lists (from, count, depth, sexpflag)
if (!parse_sexp_ignore_comments) break;
while (1)
{
- if (from == stop) goto done;
+ if (from == stop)
+ {
+ if (depth == 0)
+ goto done;
+ goto lose;
+ }
c = FETCH_CHAR (from);
if (SYNTAX (c) == Sendcomment
&& SYNTAX_COMMENT_STYLE (c) == comstyle)
@@ -1099,7 +1104,12 @@ scan_lists (from, count, depth, sexpflag)
if (SYNTAX (c = FETCH_CHAR (from)) == Scomment
&& SYNTAX_COMMENT_STYLE (c) == comstyle)
break;
- if (from == stop) goto done;
+ if (from == stop)
+ {
+ if (depth == 0)
+ goto done2;
+ goto lose;
+ }
from--;
if (SYNTAX_COMSTART_SECOND (c)
&& SYNTAX_COMSTART_FIRST (FETCH_CHAR (from))