Function: scan-sexps
scan-sexps is a function defined in syntax.c.
Signature
(scan-sexps FROM COUNT)
Documentation
Scan from character number FROM by COUNT balanced expressions.
If COUNT is negative, scan backwards. Returns the character number of the position thus found.
Comments are ignored if parse-sexp-ignore-comments is non-nil.
If the beginning or end of (the accessible part of) the buffer is reached in the middle of a parenthetical grouping, an error is signaled. If the beginning or end is reached between groupings but before count is used up, nil is returned.
Probably introduced at or before Emacs version 27.1.
Source Code
// Defined in /usr/src/emacs/src/syntax.c
{
CHECK_FIXNUM (from);
CHECK_FIXNUM (count);
return scan_lists (XFIXNUM (from), XFIXNUM (count), 0, 1);
}