From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Marshall, Simon" Newsgroups: gmane.emacs.devel Subject: RE: Font-lock decides function call is function declaration in C+ + Date: Mon, 5 Feb 2007 16:46:32 -0000 Message-ID: <81CCA6588E60BB42BE68BD029ED4826011AB3F79@wimex2.wim.midas-kapiti.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: sea.gmane.org 1170693995 26468 80.91.229.12 (5 Feb 2007 16:46:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 5 Feb 2007 16:46:35 +0000 (UTC) Cc: "'bug-cc-mode@gnu.org'" , "'emacs-devel@gnu.org'" To: "'Chong Yidong'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 05 17:46:23 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 1HE6yz-0007ZX-OC for ged-emacs-devel@m.gmane.org; Mon, 05 Feb 2007 17:46:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HE6yz-0006vq-AX for ged-emacs-devel@m.gmane.org; Mon, 05 Feb 2007 11:46:21 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HE6yp-0006vb-QM for emacs-devel@gnu.org; Mon, 05 Feb 2007 11:46:11 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HE6yo-0006to-Hx for emacs-devel@gnu.org; Mon, 05 Feb 2007 11:46:11 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HE6yo-0006tb-EH for emacs-devel@gnu.org; Mon, 05 Feb 2007 11:46:10 -0500 Original-Received: from cluster-b.mailcontrol.com ([217.68.146.190]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HE6yk-0004qR-V4; Mon, 05 Feb 2007 11:46:08 -0500 Original-Received: from rly15b.srv.mailcontrol.com (localhost.localdomain [127.0.0.1]) by rly15b.srv.mailcontrol.com (MailControl) with ESMTP id l15GjoXc011047 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 5 Feb 2007 16:45:56 GMT Original-Received: from submission.mailcontrol.com (submission.mailcontrol.com [86.111.216.190]) by rly15b.srv.mailcontrol.com (MailControl) id l15GjbhM010624; Mon, 5 Feb 2007 16:45:38 GMT Original-Received: from wimex2.wim.midas-kapiti.com ([217.196.233.101]) by rly15b-eth0.srv.mailcontrol.com (envelope-sender simon.marshall@misys.com) (MIMEDefang) with ESMTP id l15GiwkL010299; Mon, 05 Feb 2007 16:45:37 +0000 (GMT) Original-Received: by wimex2.wim.midas-kapiti.com with Internet Mail Service (5.5.2657.72) id ; Mon, 5 Feb 2007 16:46:33 -0000 X-Mailer: Internet Mail Service (5.5.2657.72) X-Scanned-By: MailControl A-06-00-00 (www.mailcontrol.com) on 10.66.1.125 X-detected-kernel: Linux 2.4-2.6 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:65924 Archived-At: > Does this bug still exist with latest CVS? If so, please provide a > simple test case (I couldn't find one in your previous messages). Yes, it does, with CVS Emacs as of 05/02/2007. Originally, I couldn't reproduce it on demand. That's why, originally, I was asking for help to track it down. But, messing around just now, I've finally managed to do it. I can't say that these are the only way of reproducing it, as I've seen this misfontification in a variety of situations that do not look obviously like these. 1. The goal is to write the code snippet: int main() { foo(); bar(); } emacs -Q foo.cpp int SPC main() SPC { RET } RET C-p C-o bar(); OK so far. Now to insert the "foo();" line: C-a C-o foo At this point, "foo" is fontified as a type, and "bar" as a variable. OK. Now: () The fontification of "foo" and "bar" disappears. OK. Now complete the snippet: ; Now "foo" is fontified as a variable. This is wrong. 2. Here's a variation. This time, the goal is to write the code snippet: int main() { foo(fubar); bar(); } emacs -Q bar.cpp int SPC main() SPC { RET } RET C-p C-o bar(); OK so far. Now to insert the "foo(fubar);" line: C-a C-o foo(fubar At this point, "bar" is fontified as a type. Not sure why, but still. Now: ); Now "bar" is fontified as a variable. This is wrong. What is worse is that in both cases I cannot get rid of the misfontification without turning Font Lock mode off and on again. I hope this help to fix The Most Annoying Fontification Bug Ever. Simon. This email message is intended for the named recipient only. It may be privileged and/or confidential. If you are not the named recipient of this email please notify us immediately and do not copy it or use it for any purpose, nor disclose its contents to any other person. Misys Banking Systems is a trading name of Misys International Banking Systems Limited which is registered in England and Wales under company registration number 00971479 and with its registered office address at Burleigh House, Chapel Oak, Salford Priors, Evesham WR11 8SP. THIS E-MAIL DOES NOT CONSTITUTE THE COMMENCEMENT OF LEGAL RELATIONS BETWEEN YOU AND MISYS INTERNATIONAL BANKING SYSTEMS LIMITED. PLEASE REFER TO THE EXECUTED CONTRACT BETWEEN YOU AND THE RELEVANT MEMBER OF THE MISYS GROUP FOR THE IDENTITY OF THE CONTRACTING PARTY WITH WHICH YOU ARE DEALING.