From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.cc-mode.general,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, 09 Mar 2005 17:35:23 -0500 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1110408088 32369 80.91.229.2 (9 Mar 2005 22:41:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 9 Mar 2005 22:41:28 +0000 (UTC) Cc: emacs-devel@gnu.org, Richard Stallman , bug-cc-mode@gnu.org Original-X-From: cc-mode-help-admin@lists.sourceforge.net Wed Mar 09 23:41:27 2005 Original-Received: from lists-outbound.sourceforge.net ([66.35.250.225]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D99mw-0004Cl-TE for sf-cc-mode-help@m.gmane.org; Wed, 09 Mar 2005 23:36:32 +0100 Original-Received: from projects.sourceforge.net (sc8-sf-list1-b.sourceforge.net [10.3.1.7]) by sc8-sf-spam2.sourceforge.net (Postfix) with ESMTP id BA5DC12B95; Wed, 9 Mar 2005 14:36:10 -0800 (PST) Original-Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.11] helo=sc8-sf-mx1.sourceforge.net) by sc8-sf-list1.sourceforge.net with esmtp (Exim 4.30) id 1D99mT-0005ql-32 for cc-mode-help@lists.sourceforge.net; Wed, 09 Mar 2005 14:35:53 -0800 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by sc8-sf-mx1.sourceforge.net with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.41) id 1D99mR-0000Fo-Cl for cc-mode-help@lists.sourceforge.net; Wed, 09 Mar 2005 14:35:53 -0800 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by fencepost.gnu.org with esmtp (Exim 4.34) id 1D99mP-0007x7-98 for bug-cc-mode@gnu.org; Wed, 09 Mar 2005 17:35:49 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1D99mK-0001k4-DP for bug-cc-mode@gnu.org; Wed, 09 Mar 2005 17:35:45 -0500 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.34) id 1D99mK-0001jl-3c; Wed, 09 Mar 2005 17:35:44 -0500 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id D954934000D; Wed, 9 Mar 2005 17:35:42 -0500 (EST) Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 1E5B54AC264; Wed, 9 Mar 2005 17:35:39 -0500 (EST) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id F41BD4BCF2; Wed, 9 Mar 2005 17:35:38 -0500 (EST) Original-To: Alan Mackenzie In-Reply-To: (Alan Mackenzie's message of "Wed, 9 Mar 2005 21:18:40 +0000 (GMT)") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-4.818, requis 5, autolearn=not spam, AWL 0.08, BAYES_00 -4.90) X-Spam-Status: No, hits=-2.0 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,RCVD_IN_ORBS,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT_GNUS_UA version=2.55 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) X-Spam-Score: 0.1 (/) X-Spam-Report: Spam Filtering performed by sourceforge.net. See http://spamassassin.org/tag/ for more details. Report problems to http://sf.net/tracker/?func=add&group_id=1&atid=200001 0.1 AWL AWL: From: address is in the auto white-list Original-Sender: cc-mode-help-admin@lists.sourceforge.net Errors-To: cc-mode-help-admin@lists.sourceforge.net X-BeenThere: cc-mode-help@lists.sourceforge.net X-Mailman-Version: 2.0.9-sf.net Precedence: bulk List-Unsubscribe: , List-Id: Bug reports, feature requests, and general talk about CC Mode. List-Post: List-Help: List-Subscribe: , List-Archive: X-Original-Date: Wed, 09 Mar 2005 17:35:23 -0500 X-MailScanner-From: cc-mode-help-admin@lists.sourceforge.net X-MailScanner-To: sf-cc-mode-help@m.gmane.org Xref: news.gmane.org gmane.emacs.cc-mode.general:2268 gmane.emacs.devel:34387 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34387 > [The discussion is about a font-locking problem reported in CC Mode: The > user types the start of a C function, but puts a NL in the middle: > void function > (int x); > The second line gets incorrectly fontified, because in its > after-change-functions, font-lock considers only that line in and of > itself.] [...] > However: I did complain about this shortcoming of font-lock on > gnu.emacs.bug way back, on Friday 10th May 2002 (Subject: Font-lock: > Major mode should be able to specify region to fontify. Message-Id: > ), and that post of mine contained a patch to add > the facility to font-lock. Nobody apart from Kim Storm (who objected > (quite reasonably) to the prolix function names I'd used) responded to > the post at the time, and nothing happened. That's when I decided that > advising font-lock was the least bad way of solving the problem. Hmm... I can't remember such a post and I have a hard time imagining why I wouldn't have jumped on it. Could you explain smoe more about your two cases (the one in awk and the one in the subject of this article): - how do they use your new before-font-lock-after-change-function hook? - why can't they use the font-lock-multiline property? - why can't they use the jit-lock-defer-multiline property? This will allow us the better judge which is the better course of action. Using advice on font-lock functions from awk-mode is pretty ugly, so it's important we come up with a better way to solve this issue. Stefan ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click