From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andrea Crotti Newsgroups: gmane.emacs.bugs Subject: bug#8438: 24.0.50; C++ macro make indentation fail Date: Wed, 13 Apr 2011 11:44:00 +0200 Message-ID: References: <4DA56BFF.6050902@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7BIT X-Trace: dough.gmane.org 1302692877 18888 80.91.229.12 (13 Apr 2011 11:07:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 13 Apr 2011 11:07:57 +0000 (UTC) Cc: Alan Mackenzie , 8438@debbugs.gnu.org To: Daniel Colascione Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 13 13:07:47 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q9xvH-0001sQ-1Y for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Apr 2011 13:07:47 +0200 Original-Received: from localhost ([::1]:60652 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9xvF-0002xY-Hb for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Apr 2011 07:07:45 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:48634) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9xv8-0002x2-63 for bug-gnu-emacs@gnu.org; Wed, 13 Apr 2011 07:07:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9xuy-0005l2-GC for bug-gnu-emacs@gnu.org; Wed, 13 Apr 2011 07:07:38 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46380) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9xus-0005jh-4E; Wed, 13 Apr 2011 07:07:22 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Q9xks-0002yW-Ki; Wed, 13 Apr 2011 06:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Crotti Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Wed, 13 Apr 2011 10:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8438 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 8438-submit@debbugs.gnu.org id=B8438.130269222211433 (code B ref 8438); Wed, 13 Apr 2011 10:57:02 +0000 Original-Received: (at 8438) by debbugs.gnu.org; 13 Apr 2011 10:57:02 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q9xkq-0002yH-Qh for submit@debbugs.gnu.org; Wed, 13 Apr 2011 06:57:01 -0400 Original-Received: from mta-2.ms.rz.rwth-aachen.de ([134.130.7.73]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q9wcJ-0001Js-0h for 8438@debbugs.gnu.org; Wed, 13 Apr 2011 05:44:07 -0400 Original-Received: from ironport-out-2.rz.rwth-aachen.de ([134.130.5.41]) by mta-2.ms.rz.RWTH-Aachen.de (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008)) with ESMTP id <0LJL00BHS4DD4XB0@mta-2.ms.rz.RWTH-Aachen.de> for 8438@debbugs.gnu.org; Wed, 13 Apr 2011 11:44:01 +0200 (CEST) X-IronPort-AV: E=Sophos;i="4.64,203,1301868000"; d="scan'208";a="52742836" Original-Received: from relay-2.ms.rz.rwth-aachen.de (HELO relay.rwth-aachen.de) ([134.130.7.75]) by ironport-in-2.rz.rwth-aachen.de with ESMTP; Wed, 13 Apr 2011 11:44:01 +0200 Original-Received: from plaetekopp (plaetekopp.informatik.RWTH-Aachen.DE [137.226.59.97]) by relay.rwth-aachen.de (8.14.4+Sun/8.13.8/1) with ESMTP id p3D9i1fl000793; Wed, 13 Apr 2011 11:44:01 +0200 (CEST) Original-Received: from crotti by plaetekopp with local (Exim 4.72) (envelope-from ) id 1Q9wcC-0004Pk-Va; Wed, 13 Apr 2011 11:44:01 +0200 In-reply-to: <4DA56BFF.6050902@gmail.com> User-Agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux) X-Mailman-Approved-At: Wed, 13 Apr 2011 06:56:59 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 13 Apr 2011 06:57:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:45784 Archived-At: Daniel Colascione writes: > > The problem actually has nothing to do with the macro: > c-forward-decl-or-cast-1 is choking on the const because it's mistaking > it for something that might be part of a member function pointer. > Because c-forward-decl-or-cast-1 fails inside > c-just-after-func-arglist-p, c-guess-basic-offset tries the next best > thing, which happens to be a template argument continuation. > > The attached patch resolves the issue. > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.11 (Darwin) > > iEYEARECAAYFAk2la/kACgkQ17c2LVA10VtGawCeLYuZ7f1QKHsFgkrYzgWCNevZ > nwQAoNStOC5JvnSs1G5sU92UrogmFAQW > =mxeQ > -----END PGP SIGNATURE----- > > === modified file 'lisp/progmodes/cc-engine.el' > --- lisp/progmodes/cc-engine.el 2011-03-06 17:03:45 +0000 > +++ lisp/progmodes/cc-engine.el 2011-04-13 09:18:47 +0000 > @@ -6475,7 +6475,7 @@ > ;; `c-font-lock-declarators'.) > (while (and (looking-at c-type-decl-prefix-key) > (if (and (c-major-mode-is 'c++-mode) > - (match-beginning 2)) > + (match-beginning 3)) > ;; If the second submatch matches in C++ then > ;; we're looking at an identifier that's a > ;; prefix only if it specifies a member pointer. This patch solves the problem for me, also the constructor indentation is now as it was in emacs 23.