aboutsummaryrefslogtreecommitdiffstats
path: root/src/syntax.c
diff options
context:
space:
mode:
authorRichard M. Stallman1995-08-16 15:03:24 +0000
committerRichard M. Stallman1995-08-16 15:03:24 +0000
commit69b07ee13afaeda4b419f615c3e3ade5f7882c5f (patch)
tree8d232005b7a3ea1c79967a66a79f3bb535fd0455 /src/syntax.c
parent2718dfa4b84b569a7f03e42f257d984bd473fea6 (diff)
downloademacs-69b07ee13afaeda4b419f615c3e3ade5f7882c5f.tar.gz
emacs-69b07ee13afaeda4b419f615c3e3ade5f7882c5f.zip
(scan_sexps_forward): Use the initial depth
in the starting state for tracking when we reach TARGETDEPTH.
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/syntax.c b/src/syntax.c
index 8a97a936d38..ed482be484d 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -1534,7 +1534,7 @@ scan_sexps_forward (stateptr, from, end, targetdepth,
1534 error ("Nesting too deep for parser"); 1534 error ("Nesting too deep for parser");
1535 curlevel->prev = -1; 1535 curlevel->prev = -1;
1536 curlevel->last = -1; 1536 curlevel->last = -1;
1537 if (!--targetdepth) goto done; 1537 if (targetdepth != depth) goto done;
1538 break; 1538 break;
1539 1539
1540 case Sclose: 1540 case Sclose:
@@ -1544,7 +1544,7 @@ scan_sexps_forward (stateptr, from, end, targetdepth,
1544 if (curlevel != levelstart) 1544 if (curlevel != levelstart)
1545 curlevel--; 1545 curlevel--;
1546 curlevel->prev = curlevel->last; 1546 curlevel->prev = curlevel->last;
1547 if (!++targetdepth) goto done; 1547 if (targetdepth != depth) goto done;
1548 break; 1548 break;
1549 1549
1550 case Sstring: 1550 case Sstring: