From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.bugs Subject: bug#7579: cc-mode c++ template-typed variable decl regression Date: Tue, 14 Feb 2012 09:16:25 -0800 Message-ID: <4F3A96E9.8090507@dancol.org> References: <87d39h33jq.fsf@gnu.org> <20120214152443.GB15736@acm.acm> <20120214161153.GC15736@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig7E84E63199D2E189AC08C57D" X-Trace: dough.gmane.org 1329239870 23747 80.91.229.3 (14 Feb 2012 17:17:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 14 Feb 2012 17:17:50 +0000 (UTC) Cc: 7579@debbugs.gnu.org, Chong Yidong , Daniel Colascione To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 14 18:17:43 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RxM0b-0004G2-A4 for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Feb 2012 18:17:41 +0100 Original-Received: from localhost ([::1]:60212 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxM0a-0000T9-PQ for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Feb 2012 12:17:40 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:35363) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxM0T-0000Qe-K6 for bug-gnu-emacs@gnu.org; Tue, 14 Feb 2012 12:17:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RxM0S-0006s7-HJ for bug-gnu-emacs@gnu.org; Tue, 14 Feb 2012 12:17:33 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36986) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxM0L-0006rR-Hs; Tue, 14 Feb 2012 12:17:25 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RxM1u-0000RH-FE; Tue, 14 Feb 2012 12:19:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Colascione Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Tue, 14 Feb 2012 17:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7579 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 7579-submit@debbugs.gnu.org id=B7579.13292398941634 (code B ref 7579); Tue, 14 Feb 2012 17:19:02 +0000 Original-Received: (at 7579) by debbugs.gnu.org; 14 Feb 2012 17:18:14 +0000 Original-Received: from localhost ([127.0.0.1]:40609 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RxM17-0000QI-Ow for submit@debbugs.gnu.org; Tue, 14 Feb 2012 12:18:13 -0500 Original-Received: from dancol.org ([96.126.100.184]:49007) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RxM15-0000Q8-Ej for 7579@debbugs.gnu.org; Tue, 14 Feb 2012 12:18:12 -0500 Original-Received: from c-24-18-179-193.hsd1.wa.comcast.net ([24.18.179.193] helo=edith.local) by dancol.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1RxLzT-0002nk-Ah; Tue, 14 Feb 2012 09:16:31 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.1) Gecko/20120208 Thunderbird/10.0.1 In-Reply-To: <20120214161153.GC15736@acm.acm> X-Enigmail-Version: 1.3.5 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:56896 Archived-At: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig7E84E63199D2E189AC08C57D Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Alan, On 2/14/12 8:11 AM, Alan Mackenzie wrote: >>>> /* In Emacs 23, adffdfa below is fontified as a variable. In Emacs H= EAD, >>>> it is not. */ >=20 >>>> void foo() >>>> { >>>> mumble x(5); >>>> std::vector adffdfa(1,2,3); >>>> }; >=20 >> Are there any syntactic clues here that a variable rather than a funct= ion >> is being declared? All I can see is that numeric literals take the pl= ace >> of "parameters". >=20 > Please ignore this request. Obviously, for a function, there must be > either nothing in the parentheses or [ ]*. Or just types: std::vector blah(int); typedef int foo; std::vector blah(foo); Still, unless we're absolutely sure we're looking at a function declaration, we should fontify a declaration as a variables declaration. Function-scope function declarations are extremely uncommon, and at least in my experience, almost always offset by keywords like "extern". Even if something like int bar(); could be a function, fontifying it as a variable would be the right thing to do in function scope for C++. --------------enig7E84E63199D2E189AC08C57D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) Comment: GPGTools - http://gpgtools.org iEYEARECAAYFAk86luoACgkQ17c2LVA10VtAvACglB7IkXZayt2se7Zk3djEQj1K bN0AoLPaiuBQmtoC5W52/SLz7bxqw29m =y2GM -----END PGP SIGNATURE----- --------------enig7E84E63199D2E189AC08C57D--