From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#28623: 27.0.50; lisp/progmodes/cc-engine.el incorrect indentation of C++14 curly-brace initializer list Date: Wed, 11 Oct 2017 20:32:21 +0000 Message-ID: <20171011203221.GB7384@ACM> References: <20171004181552.GA15562@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1507754117 2335 195.159.176.226 (11 Oct 2017 20:35:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 11 Oct 2017 20:35:17 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) Cc: John Wiegley , 28623@debbugs.gnu.org To: Tadeus Prastowo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 11 22:35:13 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e2Nic-0007qG-JJ for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 Oct 2017 22:35:06 +0200 Original-Received: from localhost ([::1]:42593 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2Nij-0001Vi-Tq for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 Oct 2017 16:35:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2Nie-0001TM-26 for bug-gnu-emacs@gnu.org; Wed, 11 Oct 2017 16:35:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e2NiY-00063S-9S for bug-gnu-emacs@gnu.org; Wed, 11 Oct 2017 16:35:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54098) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e2NiY-00063F-50; Wed, 11 Oct 2017 16:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e2NiX-0007JG-Ta; Wed, 11 Oct 2017 16:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Wed, 11 Oct 2017 20:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28623 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 28623-submit@debbugs.gnu.org id=B28623.150775406728043 (code B ref 28623); Wed, 11 Oct 2017 20:35:01 +0000 Original-Received: (at 28623) by debbugs.gnu.org; 11 Oct 2017 20:34:27 +0000 Original-Received: from localhost ([127.0.0.1]:34546 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e2Nhz-0007IF-A6 for submit@debbugs.gnu.org; Wed, 11 Oct 2017 16:34:27 -0400 Original-Received: from ocolin.muc.de ([193.149.48.4]:19487 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1e2Nhx-0007I7-HZ for 28623@debbugs.gnu.org; Wed, 11 Oct 2017 16:34:26 -0400 Original-Received: (qmail 8948 invoked by uid 3782); 11 Oct 2017 20:34:23 -0000 Original-Received: from acm.muc.de (p548C7002.dip0.t-ipconnect.de [84.140.112.2]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 11 Oct 2017 22:34:21 +0200 Original-Received: (qmail 7617 invoked by uid 1000); 11 Oct 2017 20:32:21 -0000 Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:138229 Archived-At: Hello, Tadeus. On Fri, Oct 06, 2017 at 04:59:55 +0200, Tadeus Prastowo wrote: > On Wed, Oct 4, 2017 at 8:15 PM, Alan Mackenzie wrote: > Hi Alan! > [...] > >> Any better suggestion as to how to fix the problem? > > Hey, I just love it when people diagnose and fix their own bugs, > > particularly in some of the more involved bits of CC Mode. :-) > To make the maintainer's life easier :-) > > Just one tiny, tiny, nitpick. in (looking-at ",\\s *"), isn't the "any > > amount of space" bit redundant, since we don't use match-end to get the > > precise position? In fact, I'm tending towards the simpler (eq > > (char-after) ?,). > That is surely better. Please go with that solution. > > But, as I say, that's a tiny point in a great piece of debugging. I > > will commit this (to the Emacs-26 branch of savannah) soon (from where > > it will find its way to the master branch due to some public spirited > > person who arranges these things). > Thank you very much for your review. > > Many thanks! > No problem. I'm glad to help. I'm sorry is been a week without any communication from me. The reason is I've run into problems with other related cases. For example, in 1. auto bad4 = f <3> ( 2. {3, 4}, L2 needs to be parsed as an arglist-intro and indented as shown. It's actually being parsed as a brace-list-open with anchor point on "auto". What's confusing me is the confusion between a brace list being recognised by its context (which is what c-looking-at-or-maybe-in-bracelist mostly does) and by its content. The {3, 4} above is a brace list by its content but not by its context. However, it's being wrongly recognised as a by-context brace list, hence is being parsed and indented wrongly. I'm not going to have much time to sort this out over the next week or two, so please bear with me. I haven't forgotten about this. > -- > Best regards, > Tadeus -- Alan Mackenzie (Nuremberg, Germany).