From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Syntax ambiguities in narrowed buffers and multiple major modes: a proposed solution. Date: Tue, 28 Feb 2017 20:27:20 +0000 Message-ID: <20170228202720.GC2248@acm> References: <20170225212236.GD2592@acm> <20170226120656.GA3811@acm> <20170226163724.GD3811@acm> <20170227190558.GA2921@acm> <20170228185834.GA2248@acm> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1488313676 27182 195.159.176.226 (28 Feb 2017 20:27:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 28 Feb 2017 20:27:56 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 28 21:27:52 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cioND-0006YY-Jk for ged-emacs-devel@m.gmane.org; Tue, 28 Feb 2017 21:27:51 +0100 Original-Received: from localhost ([::1]:36683 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cioNJ-000373-OA for ged-emacs-devel@m.gmane.org; Tue, 28 Feb 2017 15:27:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cioND-000361-Gb for emacs-devel@gnu.org; Tue, 28 Feb 2017 15:27:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cioNA-0003Yg-DY for emacs-devel@gnu.org; Tue, 28 Feb 2017 15:27:51 -0500 Original-Received: from ocolin.muc.de ([193.149.48.4]:59673 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1cioNA-0003YD-7i for emacs-devel@gnu.org; Tue, 28 Feb 2017 15:27:48 -0500 Original-Received: (qmail 13481 invoked by uid 3782); 28 Feb 2017 20:27:46 -0000 Original-Received: from acm.muc.de (p548C682E.dip0.t-ipconnect.de [84.140.104.46]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 28 Feb 2017 21:27:45 +0100 Original-Received: (qmail 4722 invoked by uid 1000); 28 Feb 2017 20:27:20 -0000 Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.4 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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:212664 Archived-At: Hello, Stefan. On Tue, Feb 28, 2017 at 14:09:54 -0500, Stefan Monnier wrote: > >> Yes, the state depends on where we start parsing. But there is > >> a privileged state which is the one rendered visible via font-lock, and > >> that's the one syntax-ppss intends to cache. > > That sounds like an intended resolution of the current ambiguity of the > > starting position of syntax-ppss's cache. Or am I reading too much into > > the sentence? > I think you're reading too much into it ;-) > E.g. in order for font-lock to give the right result, we sometimes need > to run it (and syntax-ppss) on an "island". Just to emphasize, in my "island" scheme, the syntactic state by starting "at the island" would be the same as starting at BOB. Either would work. This should simplify the syntactic handling. > > OK. But any time the current syntax-table is changed, the cache becomes > > invalid. For such operations, there really needs to be a means of > > isolating the cache from the syntactic operations, and vice versa. > That's right. But I think it's important to be able to *temporarily* > invalidate the cache (so as soon as you leave the with-syntax-table, > the old cache is reinstated). I agree with you here. I'll be thinking about it. > Stefan -- Alan Mackenzie (Nuremberg, Germany).