From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Syntax ambiguities in narrowed buffers and multiple major modes: a proposed solution. Date: Tue, 28 Feb 2017 14:09:54 -0500 Message-ID: References: <20170225135355.GA2592@acm> <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 X-Trace: blaine.gmane.org 1488309873 6569 195.159.176.226 (28 Feb 2017 19:24:33 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 28 Feb 2017 19:24:33 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 28 20:24:30 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 1cinNm-0000lQ-Vx for ged-emacs-devel@m.gmane.org; Tue, 28 Feb 2017 20:24:23 +0100 Original-Received: from localhost ([::1]:36392 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cinNs-0008Pl-Mm for ged-emacs-devel@m.gmane.org; Tue, 28 Feb 2017 14:24:28 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46511) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cinA3-0004IG-Ho for emacs-devel@gnu.org; Tue, 28 Feb 2017 14:10:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cin9y-0007r6-JO for emacs-devel@gnu.org; Tue, 28 Feb 2017 14:10:11 -0500 Original-Received: from [195.159.176.226] (port=34169 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cin9y-0007ph-D1 for emacs-devel@gnu.org; Tue, 28 Feb 2017 14:10:06 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1cin9m-0003cA-Tr for emacs-devel@gnu.org; Tue, 28 Feb 2017 20:09:54 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 21 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:6Zv0PUtC+amK9WPhsx9c7d1jM0g= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:212661 Archived-At: >> 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". > 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). Stefan