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: Bug #25608 and the comment-cache branch Date: Sat, 18 Feb 2017 08:49:12 -0500 Message-ID: References: <20170203172952.GC2250@acm> <0a40d539-b7bc-2655-5429-6280022106ee@yandex.ru> <20170204102410.GA2047@acm> <8f9e68fc-4314-625d-b4bf-796c71c91798@yandex.ru> <20170206192423.GB3568@acm> <4f0fabf3-be9c-7492-379b-59dc93e72b4f@yandex.ru> <20170207192119.GA2490@acm> <424e6409-029c-d15d-421c-4fb90594329c@yandex.ru> <20170214211423.GA3090@acm> <20170218104437.GA2503@acm> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1487425782 14413 195.159.176.226 (18 Feb 2017 13:49:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 18 Feb 2017 13:49:42 +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 Sat Feb 18 14:49:38 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 1cf5OM-0003MQ-22 for ged-emacs-devel@m.gmane.org; Sat, 18 Feb 2017 14:49:38 +0100 Original-Received: from localhost ([::1]:58676 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cf5OR-0006qI-Rf for ged-emacs-devel@m.gmane.org; Sat, 18 Feb 2017 08:49:43 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60704) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cf5OL-0006q8-AB for emacs-devel@gnu.org; Sat, 18 Feb 2017 08:49:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cf5OI-0004m5-9i for emacs-devel@gnu.org; Sat, 18 Feb 2017 08:49:37 -0500 Original-Received: from [195.159.176.226] (port=53273 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cf5OI-0004lx-25 for emacs-devel@gnu.org; Sat, 18 Feb 2017 08:49:34 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1cf5O8-00029p-Qa for emacs-devel@gnu.org; Sat, 18 Feb 2017 14:49:24 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 35 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:YXpvm1Z4MNkCJXI+e9d1E02PWmY= 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:212447 Archived-At: > For syntax-ppss, two syntax tables are either `equal' or not. There's > probably no other useful standard of equivalence here. You can also ignore difference between word/symbol/whitespace, I guess. That would properly handle the common situation where the syntax-table is changed during in font-lock to make all symbol-syntax chars into word-syntax chars. But I'm far from convinced it's worth the trouble. >> I already suggested to fix the issue w.r.t point-min by replacing >> syntax-ppss-cache with a table indexed by the value of point-min. >> The same idea could be used for syntax-tables. I.e. make >> syntax-ppss-cache indexed by the combination of syntax-table and >> point-min. > We'd need to be careful not to fill up too much RAM with these caches, > particularly for different values of point-min. Given that it's flushed past any buffer modification and is only filled lazily I'm not too worried. Additionally, for multi-major-mode uses, the various "branches" of the cache (each with a different point-min and syntax-table) would probably end up with no overlap at all, so it wouldn't take up more space than now. And with `with-temp-syntactic-context` the "other cache" would only live temporarily. > I'm not too keen on the "using a different point-min for some parsing" > bit. I suggest, again, using island-start and island-end syntactic I say `point-min` because that's what we currently have. What I mean by that is "the logical beginning of the (sub)buffer". So it could be island-start, or prog-indentation-context, or ... Stefan