From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Andreas_R=c3=b6hler?= Newsgroups: gmane.emacs.devel Subject: Re: Problems with syntax-ppss: Was [... Apply `comment-depth' text properties when calling `back_comment'.] Date: Sun, 13 Mar 2016 15:56:22 +0100 Message-ID: <56E57F96.7080300@online.de> References: <20160309104900.GA3948@acm.fritz.box> <20160309141930.GC3948@acm.fritz.box> <20160309193758.GH3948@acm.fritz.box> <20160310130156.GA4831@acm.fritz.box> <56E27355.4000707@online.de> <20160311120808.GA2888@acm.fritz.box> <56E479EA.5010306@online.de> <20160312204506.GB10781@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1457880932 10344 80.91.229.3 (13 Mar 2016 14:55:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Mar 2016 14:55:32 +0000 (UTC) Cc: Dmitry Gutov , Stefan Monnier , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 13 15:55:22 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1af7QP-0008Di-Qd for ged-emacs-devel@m.gmane.org; Sun, 13 Mar 2016 15:55:21 +0100 Original-Received: from localhost ([::1]:36301 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1af7QP-00066e-7M for ged-emacs-devel@m.gmane.org; Sun, 13 Mar 2016 10:55:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38110) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1af7QB-00065N-JH for emacs-devel@gnu.org; Sun, 13 Mar 2016 10:55:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1af7Q8-0003k8-DV for emacs-devel@gnu.org; Sun, 13 Mar 2016 10:55:07 -0400 Original-Received: from mout.kundenserver.de ([217.72.192.75]:60156) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1af7Q8-0003k1-4Q for emacs-devel@gnu.org; Sun, 13 Mar 2016 10:55:04 -0400 Original-Received: from [192.168.178.35] ([95.119.43.24]) by mrelayeu.kundenserver.de (mreue104) with ESMTPSA (Nemesis) id 0Lc873-1ZvqS62k8D-00jZFH; Sun, 13 Mar 2016 15:54:59 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Icedove/38.5.0 In-Reply-To: <20160312204506.GB10781@acm.fritz.box> X-Provags-ID: V03:K0:ecm7JTyr/BhpnNqSn6gxnb/ZXPwqzcrkmB3nbpwsWXjMt9gGd6r BZZcCBQ5IDUUDJZtxK6eEG0AO/ElunLLsviknjfJIXmjp2ST/nfKBVwWy9crVrjCtoKUx7t WOPpdQ//9CPtMdvxkWVQS/HuAMz3f1aUyjTk08a5WBcCdAF8G+83zO1NEYWr4KrnhTe3q5j qwyKyQyBkNX83io47IlJA== X-UI-Out-Filterresults: notjunk:1;V01:K0:fLnK6DkIRWc=:D8y2TnjtDpjDKyJljUvJIw iCIo9GhJ5zjQPzni8f0vXXeX5hMdNO/wupJRH+Zzza63DnDnlEUNY1xZHTo+1hki01fwWgCqe 47ZS461KucdUSvL6RDa5d7G3E+FMiH7lEndOoelfHK8BmAMRvmfSee/VSDF3x1FDGAqSrIePQ iKQAZNRhZqC0uDOEIjymcyW9skcj9Tmw/jOBfkCpB6xMLDOEU+8It1KiGOAm834Mki3zSQJ7u 1IANKJtYOReOM8ySLama3SUueKbM4OsR4xfefJ+bmaTpq/WkTN8ducnpLBaN5nQdJW37HghFI Dc0b0SJpoq7aSnmQumViuedvbrvGD19caJLhCYxRZxi0JPYWPVLORsExdURqg+oj1rJHNWkAg O4WT0EbWS5eBGrmJ6eHK3qsXhkEkwroeA/J2nGxaXti5xEPX2m4zSeMpsrqql3PtRcgzkNjFN 9vDW2TdU9xhU3QP66vBSeJzOVas6+G+Tr1voA64CSIaO8BPYMmB5FOHSJlVa+7JjRng6vuZ6S 3HaS1cRimysNG+PksvvO/qIQ0oqPpeGE3mXzv07xHu9r/49R8DsLLgSesWT1ONGlkzk4bVES+ w60F7iFtoU3LJ3fuEuHg1VXftNI0tKkBFoWei71QXgs/pN9FulynKP4rjEkWBqSbmiQYBX+Mf Foqj2IVRhG9N1YTqunC+NRR4ovKjdsZQb+u1la+w2WV/fVnsc3JWgsk5z3Kn49hJw+e4cY9Me YRsW/9w+EQIyr6Rv X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.72.192.75 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:201591 Archived-At: On 12.03.2016 21:45, Alan Mackenzie wrote: > Needed or not: it's impossible. The idea of a cache WRT to comments > can't work. Every insert may start a new multiline-comment at pos 1. How > a cache will detect that? The results of syntax-ppss are hardly > predictable. > The way it's done is that on any buffer change, the cache beyond the > point of the change is marked as stale in some way. Any function > needing to use the cache first checks that the "stale position" is > beyond where it needs the cache for, and if it isn't, recalculates the > cache for the buffer between "stale position" and point. > > Have a look at the documentation for `before-change-functions' and > `after-change-functions' sometime. Marking the cache as stale is one of > the things they are used for. > > There are quite a few caches which work like this. Font-locking works > like this, too. > Ahh, see, cool solution. My apologies to Stefan, assume he deserves the credits here.