From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: syntax-ppss
Date: Wed, 08 Jun 2005 18:37:50 -0400 [thread overview]
Message-ID: <87zmu0eaqp.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <E1Decw3-0005df-8E@fencepost.gnu.org> (Richard Stallman's message of "Sat, 04 Jun 2005 13:59:51 -0400")
>>>>> "Richard" == Richard Stallman <rms@gnu.org> writes:
> Would someone please write documentation in the Lisp Manual for
> syntax-ppss and friends?
How 'bout the patch below?
Stefan
--- syntax.texi 05 mai 2005 10:32:01 -0400 1.40
+++ syntax.texi 08 jun 2005 18:37:08 -0400
@@ -256,7 +256,7 @@
@deffn {Syntax class} @w{inherit}
This syntax class does not specify a particular syntax. It says to look
in the standard syntax table to find the syntax of this character. The
-designator for this syntax code is @samp{@@}.
+designator for this syntax class is @samp{@@}.
@end deffn
@deffn {Syntax class} @w{generic comment delimiter}
@@ -385,7 +385,7 @@
@samp{p} identifies an additional ``prefix character'' for Lisp syntax.
These characters are treated as whitespace when they appear between
expressions. When they appear within an expression, they are handled
-according to their usual syntax codes.
+according to their usual syntax classes.
The function @code{backward-prefix-chars} moves back over these
characters, as well as over characters whose primary syntax class is
@@ -566,7 +566,7 @@
@defun skip-syntax-forward syntaxes &optional limit
This function moves point forward across characters having syntax
-classes mentioned in @var{syntaxes} (a string of syntax code
+classes mentioned in @var{syntaxes} (a string of syntax classes
characters). It stops when it encounters the end of the buffer, or
position @var{limit} (if specified), or a character it is not supposed
to skip.
@@ -730,6 +730,15 @@
that have nested parentheses.
@end defun
+@defun syntax-ppss &optional pos
+This function returns the state of the parser at position @var{pos} if
+started with a default start state at the beginning of the buffer.
+I.e., it is equivalent to @code(parse-partial-sexp (point-min)
+@var{pos}). The difference is that @code{syntax-ppss} uses a cache to
+speed up the computation. This has as a side-effect that the 2nd and
+6th value of the returned state cannot be relied upon.
+@end defun
+
@defun scan-lists from count depth
This function scans forward @var{count} balanced parenthetical groupings
from position @var{from}. It returns the position where the scan stops.
next prev parent reply other threads:[~2005-06-08 22:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-04 17:59 syntax-ppss Richard Stallman
2005-06-08 22:37 ` Stefan Monnier [this message]
2005-06-10 0:13 ` syntax-ppss Richard Stallman
2005-06-10 22:20 ` syntax-ppss Stefan Monnier
-- strict thread matches above, loose matches on Subject: below --
2005-05-14 15:12 syntax-ppss Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zmu0eaqp.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).