From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ralf Angeli Newsgroups: gmane.emacs.devel Subject: Re: [sigra@home.se: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows] Date: Wed, 15 Mar 2006 10:02:51 +0100 Message-ID: References: <87d5go7kef.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1142416572 28815 80.91.229.2 (15 Mar 2006 09:56:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 15 Mar 2006 09:56:12 +0000 (UTC) Cc: bug-cc-mode@gnu.org, Alan Mackenzie , emacs-devel@gnu.org, "Richard M. Stallman" , martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 15 10:56:10 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 1FJSjh-0006YO-7R for ged-emacs-devel@m.gmane.org; Wed, 15 Mar 2006 10:56:09 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FJSjg-000152-OV for ged-emacs-devel@m.gmane.org; Wed, 15 Mar 2006 04:56:08 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FJSjJ-00011k-Fz for emacs-devel@gnu.org; Wed, 15 Mar 2006 04:55:45 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FJSjH-0000y5-G3 for emacs-devel@gnu.org; Wed, 15 Mar 2006 04:55:45 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FJSjH-0000xt-CQ for emacs-devel@gnu.org; Wed, 15 Mar 2006 04:55:43 -0500 Original-Received: from [134.96.7.25] (helo=triton.rz.uni-saarland.de) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FJSnX-0007Qk-AO; Wed, 15 Mar 2006 05:00:07 -0500 Original-Received: from iwi-gate.iwi.uni-sb.de (iwi-gate.iwi.uni-saarland.de [134.96.72.13]) by triton.rz.uni-saarland.de (8.12.10/8.12.10) with ESMTP id k2F92wbO11653812; Wed, 15 Mar 2006 10:02:58 +0100 (CET) Original-Received: from [134.96.72.190] (helo=neutrino.iwi.uni-sb.de) by iwi-gate.iwi.uni-sb.de with esmtp (Exim 4.53 (FreeBSD)) id 1FJRu3-000NLH-9i; Wed, 15 Mar 2006 10:02:47 +0100 Original-Received: from angeli by neutrino.iwi.uni-sb.de with local (Exim 4.60) (envelope-from ) id 1FJRu7-0002IB-RO; Wed, 15 Mar 2006 10:02:51 +0100 Original-To: Stefan Monnier In-Reply-To: <87d5go7kef.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 14 Mar 2006 17:11:59 -0500") X-IWi-MailScanner-Information: Please contact the ISP for more information X-IWi-MailScanner: Found to be clean X-IWi-MailScanner-SpamCheck: not spam, SpamAssassin (score=0, required 5, autolearn=disabled) X-MailScanner-From: angeli@iwi.uni-sb.de X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.5.1 (triton.rz.uni-saarland.de [134.96.7.25]); Wed, 15 Mar 2006 10:02:58 +0100 (CET) X-AntiVirus: checked by AntiVir Milter (version: 1.1.1-9; AVE: 6.34.0.14; VDF: 6.34.0.49; host: AntiVir2) 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:51654 Archived-At: * Stefan Monnier (2006-03-14) writes: > Also, I thought we had agreed that this new feature should be in > f-l-default-fontify-region rather than f-l-after-change-function. I believe > it is *wrong* for it to be in f-l-after-change-function where it is mostly > useless: I think so, too. > you can already get the same result by using an > (non-f-l)after-change-functions hook that sets the > font-lock-multiline property. BTW, I am currently extending the region without a hook or an advice by calculating the start of the (possibly extended) region to be fontified in a custom function plugged into font lock via `font-lock-fontify-region-function' which calls `font-lock-default-fontify-region' with the adapted region start. For that to work correctly I also had to adapt `jit-lock-context-unfontify-pos' in the custom function as suggested by you earlier. Otherwise the part of the region before the line where a change happened won't get refontified correctly. That means it will only be refontified upon redisplay (I guess), e.g. if one enters the minibuffer with `M-x'. So I wonder if a hook in `font-lock-default-fontify-region' might have to cater for that as well. -- Ralf