diff options
| author | Richard M. Stallman | 1994-06-16 15:03:04 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-06-16 15:03:04 +0000 |
| commit | c01f7ec05de7ca645f6f5c6e84fe700eccf48f5c (patch) | |
| tree | 6c8942fe9f87f4709c839173a07924a13b72fa9f /src/syntax.c | |
| parent | 97c6019c1a1ff60e309221f1f8d78400dd9655a4 (diff) | |
| download | emacs-c01f7ec05de7ca645f6f5c6e84fe700eccf48f5c.tar.gz emacs-c01f7ec05de7ca645f6f5c6e84fe700eccf48f5c.zip | |
(scan_lists): Get error if eob within comment with depth!=0.
Diffstat (limited to 'src/syntax.c')
| -rw-r--r-- | src/syntax.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/syntax.c b/src/syntax.c index 0db563c18eb..d1dd2931236 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -933,7 +933,12 @@ scan_lists (from, count, depth, sexpflag) | |||
| 933 | if (!parse_sexp_ignore_comments) break; | 933 | if (!parse_sexp_ignore_comments) break; |
| 934 | while (1) | 934 | while (1) |
| 935 | { | 935 | { |
| 936 | if (from == stop) goto done; | 936 | if (from == stop) |
| 937 | { | ||
| 938 | if (depth == 0) | ||
| 939 | goto done; | ||
| 940 | goto lose; | ||
| 941 | } | ||
| 937 | c = FETCH_CHAR (from); | 942 | c = FETCH_CHAR (from); |
| 938 | if (SYNTAX (c) == Sendcomment | 943 | if (SYNTAX (c) == Sendcomment |
| 939 | && SYNTAX_COMMENT_STYLE (c) == comstyle) | 944 | && SYNTAX_COMMENT_STYLE (c) == comstyle) |
| @@ -1099,7 +1104,12 @@ scan_lists (from, count, depth, sexpflag) | |||
| 1099 | if (SYNTAX (c = FETCH_CHAR (from)) == Scomment | 1104 | if (SYNTAX (c = FETCH_CHAR (from)) == Scomment |
| 1100 | && SYNTAX_COMMENT_STYLE (c) == comstyle) | 1105 | && SYNTAX_COMMENT_STYLE (c) == comstyle) |
| 1101 | break; | 1106 | break; |
| 1102 | if (from == stop) goto done; | 1107 | if (from == stop) |
| 1108 | { | ||
| 1109 | if (depth == 0) | ||
| 1110 | goto done2; | ||
| 1111 | goto lose; | ||
| 1112 | } | ||
| 1103 | from--; | 1113 | from--; |
| 1104 | if (SYNTAX_COMSTART_SECOND (c) | 1114 | if (SYNTAX_COMSTART_SECOND (c) |
| 1105 | && SYNTAX_COMSTART_FIRST (FETCH_CHAR (from)) | 1115 | && SYNTAX_COMSTART_FIRST (FETCH_CHAR (from)) |