From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: [simon.marshall@misys.com: Font Lock on-the-fly misfontification in C++] Date: Sun, 23 Jul 2006 23:11:45 -0400 Message-ID: References: <20060723142630.GB1433@muc.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1153710734 13431 80.91.229.2 (24 Jul 2006 03:12:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 24 Jul 2006 03:12:14 +0000 (UTC) Cc: bug-cc-mode@gnu.org, emacs-pretest-bug@gnu.org, "Marshall, Simon" , Richard Stallman , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 24 05:12:13 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G4qrc-00064O-Jc for ged-emacs-devel@m.gmane.org; Mon, 24 Jul 2006 05:12:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G4qrc-00089b-0L for ged-emacs-devel@m.gmane.org; Sun, 23 Jul 2006 23:12:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G4qrP-00087E-9I for emacs-devel@gnu.org; Sun, 23 Jul 2006 23:11:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G4qrM-00083M-5A for emacs-devel@gnu.org; Sun, 23 Jul 2006 23:11:57 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G4qrL-00083E-Vd; Sun, 23 Jul 2006 23:11:56 -0400 Original-Received: from [209.226.175.184] (helo=tomts22-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1G4qsH-0007RQ-05; Sun, 23 Jul 2006 23:12:53 -0400 Original-Received: from localhost ([70.55.143.199]) by tomts22-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060724031148.KDGE10262.tomts22-srv.bellnexxia.net@localhost>; Sun, 23 Jul 2006 23:11:48 -0400 Original-Received: by localhost (Postfix, from userid 20848) id 1701C90A6; Sun, 23 Jul 2006 23:11:45 -0400 (EDT) Original-To: Alan Mackenzie In-Reply-To: <20060723142630.GB1433@muc.de> (Alan Mackenzie's message of "Sun, 23 Jul 2006 15:26:30 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:57518 gmane.emacs.pretest.bugs:13099 Archived-At: >> 3. Append a space to the fourth commented line. Bug: fontification of Foo, >> bar, Snafu and snafu is removed from that line. > The problem is that after a textual change, the changed line gets > fontified as an atomic entity, i.e. yanked out of its context. The If you placed a font-lock-multiline property on the whole thing, font-lock would know not to yank that one line out of its context. > solution is to determine the bounds of the region to fontify by analysing > the surrounding text syntactically. Presumably, at the moment when Emacs fontified it correctly, it knew the corresponding bounds, so it could have added the font-lock-multiline property at that time, thus avoiding the need to re-determine those bounds later when refontifying. Stefan