diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-08-16 15:03:24 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-08-16 15:03:24 +0000 |
commit | 447cb07465cdbb72cf52584a8220e256e95942c2 (patch) | |
tree | 10e7820d5d6ca44add2baf6ffc0c52e7d3d713f2 /src/syntax.c | |
parent | ba926722bf487b4937f41770bee8cd73bace23c9 (diff) | |
download | emacs-447cb07465cdbb72cf52584a8220e256e95942c2.tar.gz |
(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.c | 4 |
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, error ("Nesting too deep for parser"); curlevel->prev = -1; curlevel->last = -1; - if (!--targetdepth) goto done; + if (targetdepth != depth) goto done; break; case Sclose: @@ -1544,7 +1544,7 @@ scan_sexps_forward (stateptr, from, end, targetdepth, if (curlevel != levelstart) curlevel--; curlevel->prev = curlevel->last; - if (!++targetdepth) goto done; + if (targetdepth != depth) goto done; break; case Sstring: |