From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Font-lock decides function call is function declaration in C+ + - Patch Date: 10 Mar 2007 00:23:31 +0100 Message-ID: <20070310004016.GC2092@muc.de> References: <81CCA6588E60BB42BE68BD029ED4826011AB3F79@wimex2.wim.midas-kapiti.com> <20070223010309.GA3981@muc.de> <87y7mgubia.fsf@stupidchicken.com> <20070308232434.GA4264@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1173482638 6514 80.91.229.12 (9 Mar 2007 23:23:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 9 Mar 2007 23:23:58 +0000 (UTC) Cc: cyd@stupidchicken.com, simon.marshall@misys.com, emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 10 00:23:49 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HPoR8-0001zJ-Tb for ged-emacs-devel@m.gmane.org; Sat, 10 Mar 2007 00:23:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HPoRT-0001jH-AO for ged-emacs-devel@m.gmane.org; Fri, 09 Mar 2007 18:24:07 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HPoRK-0001jC-4T for emacs-devel@gnu.org; Fri, 09 Mar 2007 18:23:58 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HPoRI-0001iz-A4 for emacs-devel@gnu.org; Fri, 09 Mar 2007 18:23:57 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HPoRI-0001iw-6F for emacs-devel@gnu.org; Fri, 09 Mar 2007 18:23:56 -0500 Original-Received: from colin.muc.de ([193.149.48.1] helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HPoQu-0006x4-Kq for emacs-devel@gnu.org; Fri, 09 Mar 2007 18:23:32 -0500 Original-Received: (qmail 45262 invoked by uid 3782); 9 Mar 2007 23:23:31 -0000 Original-Received: from acm.muc.de (p54A3FC52.dip.t-dialin.net [84.163.252.82]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Sat, 10 Mar 2007 00:23:28 +0100 Original-Received: (qmail 5026 invoked by uid 1000); 10 Mar 2007 00:40:16 -0000 Original-Date: Sat, 10 Mar 2007 00:40:16 +0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-kernel: FreeBSD 4.6-4.9 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:67664 Archived-At: Hi, Richard! On Fri, Mar 09, 2007 at 04:25:35PM -0500, Richard Stallman wrote: > It's a fairly scrappy ad-hoc patch - it fixes a particular simple bug > scenario which will surely occur frequently. > What I worry about is, how likely is it to cause new bugs in other > cases? I was worrying about that all the time I was formulating the bug and writing the patch. The answer is, IMBO[*], not very likely. Here's my analysis: (i) The patch doesn't change the buffer contents (apart from, possibly, text properties on some characters). It intended effect is purely to remove type-identifiers from the cache `c-found-types'. Removing a type from this cache when it should stay there wouldn't be that bad. Failing to remove a stale type would be no worse than the code prior to the fix. (ii) Bugs like going off the end of a buffer, getting lisp errors with empty buffers, and such like, are possible. (iii) Bugs like forgetting to widen are possible. [*] "In my biassed opion" > It would be safer just to turn off this cache feature. That would throw out some of the fontification, and would slow things down. I don't know by how much; I would guess quite a lot. > How much would users mind that? I would guess some (like Simon ;-) would mind a lot. Others (like me) would hardly notice. I think, in general, it wouldn't be good to take this cache out, now. It's been in place since CC Mode 5.30 (summer 2003). How about letting Simon test it on his C++ code? -- Alan Mackenzie (Ittersbach, Germany).