From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: syntax-ppss Date: Thu, 09 Jun 2005 20:13:53 -0400 Message-ID: References: <87zmu0eaqp.fsf-monnier+emacs@gnu.org> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1118362507 3947 80.91.229.2 (10 Jun 2005 00:15:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 10 Jun 2005 00:15:07 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 10 02:15:07 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DgXAL-0007i4-97 for ged-emacs-devel@m.gmane.org; Fri, 10 Jun 2005 02:14:29 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DgXHM-0006UU-E3 for ged-emacs-devel@m.gmane.org; Thu, 09 Jun 2005 20:21:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DgXE7-0005BE-4I for emacs-devel@gnu.org; Thu, 09 Jun 2005 20:18:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DgXE4-00059M-E0 for emacs-devel@gnu.org; Thu, 09 Jun 2005 20:18:20 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DgXE3-000577-02 for emacs-devel@gnu.org; Thu, 09 Jun 2005 20:18:19 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DgXAA-0000sJ-Kn for emacs-devel@gnu.org; Thu, 09 Jun 2005 20:14:18 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1DgX9l-0006Pj-Vz; Thu, 09 Jun 2005 20:13:54 -0400 Original-To: Stefan Monnier In-reply-to: <87zmu0eaqp.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Wed, 08 Jun 2005 18:37:50 -0400) 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:38474 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:38474 -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.