From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Fix the choked unreality in page Parser State in syntax.texi. Date: Fri, 20 Dec 2019 11:45:15 -0500 Message-ID: References: <20191218195423.GA5215@ACM> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="74681"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 20 17:47:20 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iiLQt-000JHX-Pz for ged-emacs-devel@m.gmane.org; Fri, 20 Dec 2019 17:47:19 +0100 Original-Received: from localhost ([::1]:58944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iiLQs-000345-Nv for ged-emacs-devel@m.gmane.org; Fri, 20 Dec 2019 11:47:18 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38078) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iiLP2-0000zS-FF for emacs-devel@gnu.org; Fri, 20 Dec 2019 11:45:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iiLP0-0006bs-7w for emacs-devel@gnu.org; Fri, 20 Dec 2019 11:45:23 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:65243) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iiLOy-0006aT-2W for emacs-devel@gnu.org; Fri, 20 Dec 2019 11:45:21 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id BC13944D360; Fri, 20 Dec 2019 11:45:18 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 03B8C44D361; Fri, 20 Dec 2019 11:45:17 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1576860317; bh=mCLUVrcW9fXTNxHoChWPbSQCjT+dQwaATpSOxoWlxkk=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=J+Hqv6pFgMV5O3XDTYGXVR5uknv44LDQLIYoB0PCZqH96ej8ej8Ll3y9TuduxlH8x 24qGf431zMGQs2zheCi9T7BRnCEl46tv5p3NDzIMFUxlLtLlaXNGrv8PJ4WR99jnKy 2uUOFn7ZUvaElZIPPnI4Py99BO7KabMb8RBasBWWWNXz1vaxZBv6uhLVE+I5SW3Ynr U46LSXChP0YBFHuDdB0KxRwE3qicDFacPvlWDzTYppBkU02Ku4v3rX2Y+exGsIIOCW t9HQH1hiawGBV0Pfg7zh4inI732G325jvmIZ/Ad8yo+S7Hn86heFVIJRc9Okh6h3Po i7AMLUYw4UsVg== Original-Received: from alfajor (modemcable157.163-203-24.mc.videotron.ca [24.203.163.157]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B9264120C4F; Fri, 20 Dec 2019 11:45:16 -0500 (EST) In-Reply-To: <20191218195423.GA5215@ACM> (Alan Mackenzie's message of "Wed, 18 Dec 2019 19:54:23 +0000") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:243517 Archived-At: > I therefore propose installing the following documentation patch for > Emacs 27. It also tidies up one or two untidinesses: LGTM, thanks (rather than replacing "one" with "two", I'd rephrase so that it doesn't mention how many there are to avoid such inconsistencies in the future ;-) Stefan > > > diff --git a/doc/lispref/syntax.texi b/doc/lispref/syntax.texi > index 63d534dd13..d494d6fc5e 100644 > --- a/doc/lispref/syntax.texi > +++ b/doc/lispref/syntax.texi > @@ -797,12 +797,13 @@ Parser State > A @dfn{parser state} is a list of (currently) eleven elements > describing the state of the syntactic parser, after it parses the text > between a specified starting point and a specified end point in the > -buffer. Parsing functions such as @code{syntax-ppss} > +buffer using @code{parse-partial-sexp} (@pxref{Low-Level Parsing}). > +Parsing functions such as @code{syntax-ppss} > @ifnottex > (@pxref{Position Parse}) > @end ifnottex > -return a parser state as the value. Some parsing functions accept a > -parser state as an argument, for resuming parsing. > +also return a parser state as the value. @code{parse-partial-sexp} > +can accept a parser state as an argument, for resuming parsing. > > Here are the meanings of the elements of the parser state: > > @@ -866,11 +867,11 @@ Parser State > @end enumerate > > Elements 1, 2, and 6 are ignored in a state which you pass as an > -argument to continue parsing. Elements 9 and 10 are mainly used > -internally by the parser code. > +argument to @code{parse-partial-sexp} to continue parsing. Elements 9 > +and 10 are mainly used internally by the parser code. > > - One additional piece of useful information is available from a > -parser state using this function: > + Two additional pieces of useful information are available from a > +parser state using these functions: > > @defun syntax-ppss-toplevel-pos state > This function extracts, from parser state @var{state}, the last > @@ -883,8 +884,8 @@ Parser State > @end defun > > @defun syntax-ppss-context state > -Return @code{string} if @var{state} is a string and @code{comment} if > -it's a comment. > +Return @code{string} if the end position of a scan returning > +@var{state} is in a string, and @code{comment} if it's in a comment. > @end defun > > @node Low-Level Parsing