From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: syntax-ppss Date: Fri, 10 Jun 2005 18:20:42 -0400 Message-ID: <87d5qtam6s.fsf-monnier+emacs@gnu.org> References: <87zmu0eaqp.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1118442403 10579 80.91.229.2 (10 Jun 2005 22:26:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 10 Jun 2005 22:26:43 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 11 00:26:42 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dgrx9-00046M-3y for ged-emacs-devel@m.gmane.org; Sat, 11 Jun 2005 00:26:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dgs1P-0007vb-2G for ged-emacs-devel@m.gmane.org; Fri, 10 Jun 2005 18:30:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dgrzt-0007CV-SB for emacs-devel@gnu.org; Fri, 10 Jun 2005 18:29:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dgrzk-000755-E1 for emacs-devel@gnu.org; Fri, 10 Jun 2005 18:28:57 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dgrzj-00070U-Ps for emacs-devel@gnu.org; Fri, 10 Jun 2005 18:28:55 -0400 Original-Received: from [209.226.175.4] (helo=tomts16-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DgrsF-0002Yi-Vv; Fri, 10 Jun 2005 18:21:12 -0400 Original-Received: from alfajor ([70.48.82.205]) by tomts16-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20050610222042.TSWO27508.tomts16-srv.bellnexxia.net@alfajor>; Fri, 10 Jun 2005 18:20:42 -0400 Original-Received: by alfajor (Postfix, from userid 1000) id 846C9D73D3; Fri, 10 Jun 2005 18:20:42 -0400 (EDT) Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Thu, 09 Jun 2005 20:13:53 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:38539 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:38539 > -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