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: Sun, 12 Feb 2006 14:06:49 +0100 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 1139755688 7742 80.91.229.2 (12 Feb 2006 14:48:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 12 Feb 2006 14:48:08 +0000 (UTC) Cc: bug-cc-mode@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 12 15:48:05 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 1F8IW9-0001u3-12 for ged-emacs-devel@m.gmane.org; Sun, 12 Feb 2006 15:48:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F8IS0-00048N-GW for ged-emacs-devel@m.gmane.org; Sun, 12 Feb 2006 09:43:44 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F8HVI-0001Q8-1H for emacs-devel@gnu.org; Sun, 12 Feb 2006 08:43:04 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F8HUy-0001D6-6H for emacs-devel@gnu.org; Sun, 12 Feb 2006 08:42:47 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F8HUZ-0000xR-KX for emacs-devel@gnu.org; Sun, 12 Feb 2006 08:42:20 -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 1F8HYV-0006vd-Kp; Sun, 12 Feb 2006 08:46:24 -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 k1CD73bO10310754; Sun, 12 Feb 2006 14:07:03 +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 1F8Gw8-000AgR-8a; Sun, 12 Feb 2006 14:06:44 +0100 Original-Received: from angeli by neutrino.iwi.uni-sb.de with local (Exim 4.60) (envelope-from ) id 1F8GwD-00066I-MF; Sun, 12 Feb 2006 14:06:49 +0100 Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Thu, 10 Mar 2005 20:46:46 -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]); Sun, 12 Feb 2006 14:07:03 +0100 (CET) X-AntiVirus: checked by AntiVir Milter (version: 1.1.1-9; AVE: 6.33.0.31; VDF: 6.33.0.229; 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:50402 Archived-At: The quoted message is from a discussion back in last March regarding the addition of a hook for extending backwards the region to be fontified with a hook to be called before `font-lock-after-change-function'. * Richard Stallman (2005-03-11) writes: > This patch to font-lock is exactly the sort of change I was thinking > of. Could someone please install it, then rename > before-font-lock-after-change-function to > font-lock-extend-region-function, and rename > font-lock-run-before-after-change-hook to font-lock-extend-region? Apparently the hook hasn't been added yet. Is it still planned to add it? The reason I am asking this is that I am currently wrecking my brain about how to make font locking for LaTeX buffers controlled by AUCTeX more robust. On a regular basis we are getting reports about font locking of multiline constructs failing, thereby spilling color all over the buffer and/or slowing down editing quite severly. (We are using `font-lock-multiline' for fontification of multiline constructs.) This mainly happens with text which is erroneously identified as the start of a multiline construct but has no matching closing tag. The last report we got was about "<<" which can be an opening quotation mark but which may also be used unmatched in some math constructs. An idea for making font locking more robust in this respect might be to desist from coloring the rest of the buffer in case of an unmatched opening tag, i.e. to leave it alone if a matching closing tag cannot be found in an arbitrarily large region after the opening tag. That would mean fontification will only be applied as soon as the closing tag is typed. For that to work, however, I'd have to look backwards for an opening tag which could be done with a hook like the one proposed above. -- Ralf