From: Richard M. Stallman Date: Wed, 16 Aug 1995 15:03:24 +0000 (+0000) Subject: (scan_sexps_forward): Use the initial depth X-Git-Tag: emacs-19.34~2990 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=69b07ee13afaeda4b419f615c3e3ade5f7882c5f;p=emacs.git (scan_sexps_forward): Use the initial depth in the starting state for tracking when we reach TARGETDEPTH. --- 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: