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: Thu, 19 Mar 2015 09:49:13 -0400 Message-ID: References: <20150201212213.17840.3710@vcs.savannah.gnu.org> <55076CF8.60309@dancol.org> <20150318120806.GA4160@acm.fritz.box> <550A43BB.3070904@dancol.org> <20150319093110.GA2753@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1426772986 32093 80.91.229.3 (19 Mar 2015 13:49:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Mar 2015 13:49:46 +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 Thu Mar 19 14:49:39 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 1YYapM-0002Vh-NJ for ged-emacs-devel@m.gmane.org; Thu, 19 Mar 2015 14:49:36 +0100 Original-Received: from localhost ([::1]:39257 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYapM-0007v2-24 for ged-emacs-devel@m.gmane.org; Thu, 19 Mar 2015 09:49:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54951) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYap7-0007ux-UE for emacs-devel@gnu.org; Thu, 19 Mar 2015 09:49:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYap2-00023w-Sq for emacs-devel@gnu.org; Thu, 19 Mar 2015 09:49:21 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:56360) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYap2-00023n-OH for emacs-devel@gnu.org; Thu, 19 Mar 2015 09:49:16 -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 t2JDnDBG013001; Thu, 19 Mar 2015 09:49:13 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 7BAF418B6; Thu, 19 Mar 2015 09:49:13 -0400 (EDT) In-Reply-To: <20150319093110.GA2753@acm.fritz.box> (Alan Mackenzie's message of "Thu, 19 Mar 2015 09:31:11 +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 RV5250=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5250> : inlines <2442> : streams <1408065> : uri <1884655> 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:184015 Archived-At: > The problem in #19669 was that Font Lock's extension of the region to be > font locked to the beginning of the line was changing the syntactic > context, hence CC Mode's font locking didn't work in that case. The > solution was to prevent that extension in the pertinent case. However, I > got it wrong. The way I see it, the core of the problem is that the way you handle partial re-fontification of a multi-line `union' construct has a dead spot. More specifically, if you have code like 1 union 2 { 3 foo, 4 bar 5 } you can handle fontification from 1,3, or 4 but not from 2. You need to refine the system you use to keep track of whether we're within a `union' so that it knows that position 2 is also "within a union". Stefan