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: Fri, 17 Feb 2006 09:36:35 -0500 Message-ID: <87d5hmawi0.fsf-monnier+emacs@gnu.org> References: <87slqjcorr.fsf-monnier+emacs@gnu.org> <43F57FDD.9010409@gmx.at> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1140187070 486 80.91.229.2 (17 Feb 2006 14:37:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 17 Feb 2006 14:37:50 +0000 (UTC) Cc: Alan Mackenzie , bug-cc-mode@gnu.org, Ralf Angeli , rms@gnu.org, emacs-devel@gnu.org Original-X-From: cc-mode-help-admin@lists.sourceforge.net Fri Feb 17 15:37:40 2006 Return-path: Envelope-to: sf-cc-mode-help@m.gmane.org Original-Received: from lists-outbound.sourceforge.net ([66.35.250.225]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FA6jc-0003WR-Pj for sf-cc-mode-help@m.gmane.org; Fri, 17 Feb 2006 15:37:25 +0100 Original-Received: from sc8-sf-list1-b.sourceforge.net (sc8-sf-list1-b.sourceforge.net [10.3.1.7]) by sc8-sf-spam2.sourceforge.net (Postfix) with ESMTP id E038116044; Fri, 17 Feb 2006 06:37:23 -0800 (PST) Original-Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list1.sourceforge.net with esmtp (Exim 4.30) id 1FA6iz-00048E-7s for cc-mode-help@lists.sourceforge.net; Fri, 17 Feb 2006 06:36:45 -0800 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by mail.sourceforge.net with esmtps (TLSv1:RC4-SHA:128) (Exim 4.44) id 1FA6ix-0001cR-MI for cc-mode-help@lists.sourceforge.net; Fri, 17 Feb 2006 06:36:45 -0800 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by fencepost.gnu.org with esmtp (Exim 4.34) id 1FA6iu-0000W6-N8 for bug-cc-mode@gnu.org; Fri, 17 Feb 2006 09:36:40 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.52) id 1FA6oE-0006M8-Nu for bug-cc-mode@gnu.org; Fri, 17 Feb 2006 09:42:13 -0500 Original-Received: from [209.226.175.93] (helo=tomts36-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FA6oE-0006Ly-BI; Fri, 17 Feb 2006 09:42:10 -0500 Original-Received: from alfajor ([67.71.116.200]) by tomts36-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060217143636.MFGD13653.tomts36-srv.bellnexxia.net@alfajor>; Fri, 17 Feb 2006 09:36:36 -0500 Original-Received: by alfajor (Postfix, from userid 1000) id 63039D73A1; Fri, 17 Feb 2006 09:36:35 -0500 (EST) Original-To: martin rudalics In-Reply-To: <43F57FDD.9010409@gmx.at> (martin rudalics's message of "Fri, 17 Feb 2006 08:48:45 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-Spam-Score: 0.0 (/) 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 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: Fri, 17 Feb 2006 09:36:35 -0500 Xref: news.gmane.org gmane.emacs.cc-mode.general:3048 gmane.emacs.devel:50659 Archived-At: >> Maybe what will cut it is: using some kind of after/before-change-function >> (which doesn't have to be in font-lock-after-change-function) detect when >> a terminator is added/removed and in that case add a font-lock-multiline >> property on the whole element (which will cause the whole element to be >> (re)fontified not matter what jit-lock thinks, but the whole-element >> fontification will only happen this one time since the font-lock-multiline >> property is removed afterwards). > Text within "<<" ... ">>" would have to keep its multiline property > forever. The above way said in the context of: > Now let's say you have a multiline element which your font-lock-keyword is > somehow able to (re)highlight line-by-line, then you indeed don't need to > extend the region in font-lock-fontify-region. So the answer to: > Who'd be responsible for highlighting "baz" specially? is font-lock-keywords. See the "recent" change to smerge-mode's font-lock-keywords for an example. Stefan ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642