From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: master 305dbc7 2/4: Move description of value to syntax-ppss function. Date: Fri, 13 Dec 2019 15:03:46 +0200 Message-ID: <7fbe5ad6-2ea6-5a5d-d77e-6df2ba143eb4@yandex.ru> References: <20191030121649.15369.13207@vcs0.savannah.gnu.org> <20191030121651.BFCF8204DF@vcs0.savannah.gnu.org> <87eeyutgwa.fsf@gnus.org> <333d1d46-ab79-5818-4367-b28ed915aff6@yandex.ru> <87a79itfzp.fsf@gnus.org> <875zk6tfo7.fsf@gnus.org> <871ruuou5c.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="115451"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 Cc: Stefan Monnier , Emacs developers To: Noam Postavsky , Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 13 14:07:58 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 1ifkfl-000Trs-PG for ged-emacs-devel@m.gmane.org; Fri, 13 Dec 2019 14:07:57 +0100 Original-Received: from localhost ([::1]:49062 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifkfk-0000rr-9d for ged-emacs-devel@m.gmane.org; Fri, 13 Dec 2019 08:07:56 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53956) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifkbu-00050o-7Q for emacs-devel@gnu.org; Fri, 13 Dec 2019 08:03:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ifkbs-0003Rn-ID for emacs-devel@gnu.org; Fri, 13 Dec 2019 08:03:58 -0500 Original-Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:44560) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ifkbr-0003Mv-SL for emacs-devel@gnu.org; Fri, 13 Dec 2019 08:03:56 -0500 Original-Received: by mail-wr1-x42b.google.com with SMTP id q10so6537998wrm.11 for ; Fri, 13 Dec 2019 05:03:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=eEB+Nz1gpSPbqz+PbE1+C3b9scUN0HVu3vedXs4yR+g=; b=sVyXWI1hXLxti10hg6SZO+8RIMP2k3+W5GioBzZi8PWzMHio19f9ahHhvczkytPFwB LuuXyvs55xB2UDiJeWym8/HJqe0uLiMOXfPyYrfcqjcvTM/rYvS1W0ZT9t6xY0mPsxL/ CGsCSKp/BX6VTjgkDNR8FaPfm3hZkFWhvXA/Li0noP75bQQpMY6UUmIVIIpZxTRtImEB AyK8rJqHh7B8iT8R35k8RHzRWfpbx6zc7H6DoV75EGqyCgg+wOoWJoODoUpHhFaZB7wv eNQDiGkVbIt0vW6U91ievZycxxThRHyCUxCQhqc/UBcxy9Jgookhx/8AM0yOLrqMIKND 3ufw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=eEB+Nz1gpSPbqz+PbE1+C3b9scUN0HVu3vedXs4yR+g=; b=W/LP+HPnTkDMGrK5cLLjupKm3Uv53uIo8X8gho3hlgLgASSs1CWj9TsQuz7+yip/hW mVbTG8gxbdP9RePtgYhUMHWaYjL4C2LdkvUXKFeD0ExMAX2bjfILuNUpXYNdydf151ju i/RBwKW4RFK8RcZB1kkpJtQQeVuPybQCIn1cM1nnpTyIB/XIk1eoqP64XZ9dl7m6aSR4 sILvqmOp9WGEjvZKkwWcXmkupeghM2SpFx0kbdLIBgigq1NeCxArMV04kO/YbhrXJI93 T4t6rIqTZ840VgNBSWaRtA5n29CH6lg2LsGDL6QrgrdI318RJEA8SwZLBsHyi/4t58TC OffQ== X-Gm-Message-State: APjAAAUCC2iwoapI1hFvzz6IztYkuNslc6xcTlDV2+EdqqpdgsgPFVyt HQ9FdoD769qBHTDOKQR20gAcexHh X-Google-Smtp-Source: APXvYqyX/6Xo6GYBJssD8ndq5VnhMiAyZy/f7NIO2TdGPDmuSMOqpDQHFTpzLpv3M9fr14Fj59QY+Q== X-Received: by 2002:a5d:68cf:: with SMTP id p15mr12785035wrw.31.1576242230622; Fri, 13 Dec 2019 05:03:50 -0800 (PST) Original-Received: from [192.168.0.149] ([109.110.245.170]) by smtp.googlemail.com with ESMTPSA id t81sm10108969wmg.6.2019.12.13.05.03.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Dec 2019 05:03:49 -0800 (PST) In-Reply-To: Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42b 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:243351 Archived-At: On 13.12.2019 14:34, Noam Postavsky wrote: > On Wed, 30 Oct 2019 at 18:22, Lars Ingebrigtsen wrote: > >> Done (with Dmitry's suggestions). Everybody -- feel free to bikeshed >> (and change any of the accessor names) before we start using these. > > Is it too late to bikeshed the names? ;) > I had earlier proposed some slightly shorter ones in > https://debbugs.gnu.org/32504#51, posting them here as a diff. > > @@ -90,30 +90,30 @@ syntax-propertize-extend-region-functions > (:copier nil) > (:type list)) > (depth nil :documentation "depth in parens") > - (innermost-start > + (list-start Sounds ambiguous: the point is that it's innermost, among possible other list starts. > nil :documentation > "character address of start of innermost containing list; nil if none.") > - (last-complete-sexp-start > + (last-sexp-start Same (but, like, in reverse): "complete" is important. > nil :documentation > "character address of start of last complete sexp terminated.") > (string-terminator nil :documentation "\ > non-nil if inside a string. > (it is the character that will terminate the string, or t if the > string should be terminated by a generic string delimiter.)") > - (comment-nesting nil :documentation "\ > + (comment nil :documentation "\ Doesn't this name imply some other value? Like a string (comment opener or its contents)? > - (comment-or-string-start > + (context-start > nil :documentation > "character address of start of comment or string; nil if not in one.") That kind of implies that strings and comments are the most important contexts when parsing a file. > - (open-paren-positions > + (open-parens > nil :documentation > "List of positions of currently open parens, outermost first.") > - (two-character-syntax nil :documentation "\ > + (syntax-sequence nil :documentation "\ > When the last position scanned holds the first character of a > (potential) two character construct, the syntax of that position, > otherwise nil. That construct can be a two character comment These look okay to me. min-depth too, but, like last-complete-sexp-start, these fields in values returned by syntax-ppss are unreliable/undefined, so they won't be used in most Lisp programs anyway.