unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* syntax-ppss
@ 2005-05-14 15:12 Richard Stallman
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Stallman @ 2005-05-14 15:12 UTC (permalink / raw)


Would someone please write documentation in the Lisp Manual for
syntax-ppss and friends?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* syntax-ppss
@ 2005-06-04 17:59 Richard Stallman
  2005-06-08 22:37 ` syntax-ppss Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Stallman @ 2005-06-04 17:59 UTC (permalink / raw)


Would someone please write documentation in the Lisp Manual for
syntax-ppss and friends?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: syntax-ppss
  2005-06-04 17:59 syntax-ppss Richard Stallman
@ 2005-06-08 22:37 ` Stefan Monnier
  2005-06-10  0:13   ` syntax-ppss Richard Stallman
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2005-06-08 22:37 UTC (permalink / raw)
  Cc: emacs-devel

>>>>> "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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: syntax-ppss
  2005-06-08 22:37 ` syntax-ppss Stefan Monnier
@ 2005-06-10  0:13   ` Richard Stallman
  2005-06-10 22:20     ` syntax-ppss Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Stallman @ 2005-06-10  0:13 UTC (permalink / raw)
  Cc: emacs-devel

    -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

It needs to be "class", singular.

    +@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
    +

Clearer would be

    This function returns the state that the parser would have at
    position @var{pos}, if it were started with a default start state
    at the beginning of the buffer.  Thus, it is equivalent to
    @code(parse-partial-sexp (point-min) @var{pos}), except that
    @code{syntax-ppss} uses a cache to speed up the
    computation.  Also, the 2nd and 6th value of the returned state are
    not meaningful.
    @end defun
    
Which two values does "the 2nd and 6th value" refer to?  It isn't
clear to me; I am not sure whether they are counted 0-origin or
1-origin.  It won't be clear to the reader, either.

So please give descriptions of them, not just numbers.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: syntax-ppss
  2005-06-10  0:13   ` syntax-ppss Richard Stallman
@ 2005-06-10 22:20     ` Stefan Monnier
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2005-06-10 22:20 UTC (permalink / raw)
  Cc: emacs-devel

>     -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

> It needs to be "class", singular.

>     +@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
>     +

> Clearer would be

>     This function returns the state that the parser would have at
>     position @var{pos}, if it were started with a default start state
>     at the beginning of the buffer.  Thus, it is equivalent to
>     @code(parse-partial-sexp (point-min) @var{pos}), except that
>     @code{syntax-ppss} uses a cache to speed up the
>     computation.  Also, the 2nd and 6th value of the returned state are
>     not meaningful.
>     @end defun
    
> Which two values does "the 2nd and 6th value" refer to?  It isn't
> clear to me; I am not sure whether they are counted 0-origin or
> 1-origin.  It won't be clear to the reader, either.

> So please give descriptions of them, not just numbers.

Thanks, fixed and installed.


        Stefan

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-06-10 22:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-04 17:59 syntax-ppss Richard Stallman
2005-06-08 22:37 ` syntax-ppss Stefan Monnier
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

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).