From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] emacs-24 d69e9f1: CC Mode: Stop Font Lock forcing fontification from BOL. Fixes debbugs#19669. Date: Fri, 20 Mar 2015 18:01:51 -0400 Message-ID: References: <55076CF8.60309@dancol.org> <20150318120806.GA4160@acm.fritz.box> <550A43BB.3070904@dancol.org> <20150319093110.GA2753@acm.fritz.box> <20150319203724.GB2753@acm.fritz.box> <20150320163027.GB3493@acm.fritz.box> <20150320211206.GD3493@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1426888941 20352 80.91.229.3 (20 Mar 2015 22:02:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Mar 2015 22:02:21 +0000 (UTC) Cc: Daniel Colascione , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 20 23:02:05 2015 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 1YZ4zT-0007kn-EH for ged-emacs-devel@m.gmane.org; Fri, 20 Mar 2015 23:02:03 +0100 Original-Received: from localhost ([::1]:45859 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YZ4zS-0001pD-MV for ged-emacs-devel@m.gmane.org; Fri, 20 Mar 2015 18:02:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56801) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YZ4zO-0001nG-I5 for emacs-devel@gnu.org; Fri, 20 Mar 2015 18:01:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YZ4zL-0003GY-Cn for emacs-devel@gnu.org; Fri, 20 Mar 2015 18:01:58 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:42819) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YZ4zL-0003GP-6Z for emacs-devel@gnu.org; Fri, 20 Mar 2015 18:01:55 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id t2KM1q3U005408; Fri, 20 Mar 2015 18:01:52 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id E088DCC6; Fri, 20 Mar 2015 18:01:51 -0400 (EDT) In-Reply-To: <20150320211206.GD3493@acm.fritz.box> (Alan Mackenzie's message of "Fri, 20 Mar 2015 21:12:06 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5251=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5251> : inlines <2455> : streams <1408803> : uri <1885874> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 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:184062 Archived-At: > OK. I think I've got it now. jit-lock-fontify-now is expanding > backwards into a region which is already fontified, Whether it's already fontified is not the important point. The important point is that it's already been *rendered* (i.e. the buffer's content has already been read and turned into data in the glyph matrices used to draw on the screen). > but for which it doesn't "have permission", It has permission alright, but whatever it does will only affect that next redisplay (i.e. usually at the next command). > The abstract cause of all these difficulties seems to be Font Lock's not > distinguishing between a beginning of region to be used for analysis, and > the beginning of region to which face properties will be applied. Font lock indeed doesn't have a notion of "beginning of region to be used for analysis" at all, so it can't distinguish it from the notion of "beginning of region to which face properties will be applied". If your keyword rules need to look at some earlier text to get context, they're free to do so. > this understanding. Perhaps if "any part of the buffer prior to that" > had been "the initial part of the first line before `orig-start'", I > would have got it sooner. But that's very specific to your case. Usually the problem occurs when orig-start is at a BOL, but start is at an earlier line. Stefan