aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorChong Yidong2012-02-17 22:01:05 +0800
committerChong Yidong2012-02-17 22:01:05 +0800
commit7b926f3f3db5d9a22260209547fb3e60df919ecf (patch)
tree7728b5c424cb28deb71a90afe24b9eaa89320a5c /doc
parentee0ce425dbd94d9b15c1442f9699a47b7feeaf90 (diff)
downloademacs-7b926f3f3db5d9a22260209547fb3e60df919ecf.tar.gz
emacs-7b926f3f3db5d9a22260209547fb3e60df919ecf.zip
Clarify doc of scan-lists.
* doc/lispref/syntax.texi (Motion via Parsing): Doc fix for scan-lists. * src/syntax.c (Fscan_lists): Doc fix. Fixes: debbugs:10833
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/ChangeLog4
-rw-r--r--doc/lispref/syntax.texi30
2 files changed, 19 insertions, 15 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index ab01544c453..85e78abdc32 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,7 @@
12012-02-17 Chong Yidong <cyd@gnu.org>
2
3 * syntax.texi (Motion via Parsing): Doc fix for scan-lists.
4
12012-02-17 Glenn Morris <rgm@gnu.org> 52012-02-17 Glenn Morris <rgm@gnu.org>
2 6
3 * hooks.texi (Standard Hooks): Fix cross-ref to Emacs manual. 7 * hooks.texi (Standard Hooks): Fix cross-ref to Emacs manual.
diff --git a/doc/lispref/syntax.texi b/doc/lispref/syntax.texi
index dbfa4ca9045..e2fb3238642 100644
--- a/doc/lispref/syntax.texi
+++ b/doc/lispref/syntax.texi
@@ -646,25 +646,25 @@ result, Emacs treats them as four consecutive empty string constants.
646based on parsing expressions. 646based on parsing expressions.
647 647
648@defun scan-lists from count depth 648@defun scan-lists from count depth
649This function scans forward @var{count} balanced parenthetical groupings 649This function scans forward @var{count} balanced parenthetical
650from position @var{from}. It returns the position where the scan stops. 650groupings from position @var{from}. It returns the position where the
651If @var{count} is negative, the scan moves backwards. 651scan stops. If @var{count} is negative, the scan moves backwards.
652 652
653If @var{depth} is nonzero, assume that the starting point is already 653If @var{depth} is nonzero, treat the starting position as being
654@var{depth} parentheses deep. This function counts out @var{count} 654@var{depth} parentheses deep. The scanner moves forward or backward
655number of points where the parenthesis depth goes back to zero, then 655through the buffer until the depth changes to zero @var{count} times.
656stops. Thus, a positive value for @var{depth} has the effect of 656Hence, a positive value for @var{depth} has the effect of moving out
657moving out @var{depth} levels of parenthesis, whereas a negative 657@var{depth} levels of parenthesis from the starting position, while a
658@var{depth} has the effect of moving deeper by @var{-depth} levels of 658negative @var{depth} has the effect of moving deeper by @var{-depth}
659parenthesis. 659levels of parenthesis.
660 660
661Scanning ignores comments if @code{parse-sexp-ignore-comments} is 661Scanning ignores comments if @code{parse-sexp-ignore-comments} is
662non-@code{nil}. 662non-@code{nil}.
663 663
664If the scan reaches the beginning or end of the buffer (or its 664If the scan reaches the beginning or end of the accessible part of the
665accessible portion), and the depth is not zero, an error is signaled. 665buffer before it has scanned over @var{count} parenthetical groupings,
666If the depth is zero but the count is not used up, @code{nil} is 666the return value is @code{nil} if the depth at that point is zero; if
667returned. 667the depth is non-zero, a @code{scan-error} error is signaled.
668@end defun 668@end defun
669 669
670@defun scan-sexps from count 670@defun scan-sexps from count