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: Thu, 9 Nov 2017 18:53:54 +0000 Message-ID: <20171109185354.GA15085__23819.6259401322$1510253833$gmane$org@ACM> References: <20171004181552.GA15562@ACM> <20171011203221.GB7384@ACM> <20171104195639.GA5384@ACM> <20171108192358.GA4582@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1510253833 2440 195.159.176.226 (9 Nov 2017 18:57:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 9 Nov 2017 18:57:13 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) Cc: John Wiegley , 28623-done@debbugs.gnu.org To: Tadeus Prastowo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 09 19:57:09 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 1eCs0h-0000MZ-Id for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Nov 2017 19:57:07 +0100 Original-Received: from localhost ([::1]:38381 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eCs0o-0005Jv-NN for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Nov 2017 13:57:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eCrzi-0004Qa-RI for bug-gnu-emacs@gnu.org; Thu, 09 Nov 2017 13:56:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eCrzh-0002G2-Va for bug-gnu-emacs@gnu.org; Thu, 09 Nov 2017 13:56:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52099) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eCrze-0002EN-8m; Thu, 09 Nov 2017 13:56:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eCrze-0003oa-2A; Thu, 09 Nov 2017 13:56:02 -0500 Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Thu, 09 Nov 2017 18:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 28623 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Mail-Followup-To: 28623@debbugs.gnu.org, acm@muc.de, tadeus.prastowo@unitn.it Original-Received: via spool by 28623-done@debbugs.gnu.org id=D28623.151025370914595 (code D ref 28623); Thu, 09 Nov 2017 18:56:01 +0000 Original-Received: (at 28623-done) by debbugs.gnu.org; 9 Nov 2017 18:55:09 +0000 Original-Received: from localhost ([127.0.0.1]:60780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eCryn-0003nL-L8 for submit@debbugs.gnu.org; Thu, 09 Nov 2017 13:55:09 -0500 Original-Received: from ocolin.muc.de ([193.149.48.4]:20306 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1eCryl-0003nC-Ax for 28623-done@debbugs.gnu.org; Thu, 09 Nov 2017 13:55:07 -0500 Original-Received: (qmail 32206 invoked by uid 3782); 9 Nov 2017 18:55:05 -0000 Original-Received: from acm.muc.de (p548C6A35.dip0.t-ipconnect.de [84.140.106.53]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 09 Nov 2017 19:55:04 +0100 Original-Received: (qmail 15116 invoked by uid 1000); 9 Nov 2017 18:53:54 -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:139682 Archived-At: Hello, Tadeus. On Thu, Nov 09, 2017 at 10:27:55 +0100, Tadeus Prastowo wrote: > On Wed, Nov 8, 2017 at 8:23 PM, Alan Mackenzie wrote: [...] > > I've corrected c-inside-bracelist-p such that it now uses position l as > > this limit. I've also taken the opportunity to simplify it quite a bit. > > This now appears to work. > > So, thank you for taking the time to test this, and finding this further > > bug. > My pleasure. And thank you very much for looking into this last > problem as well. I've committed the patch to the canonical places, including the emacs-26 branch at savannah (whence it will find it's way into master), and I'm closing the bug. [ .... ] > And, just out of curiosity, in cc-engine, there is a long function > with many inline comments in the form of CASE xxx. Why aren't those > refactored into individual functions? Performance issue? There are two such functions, c-forward-decl-or-cast-1 and c-guess-basic-syntax. Both of them have LOTS of local variables which would have to be passed into smaller individual functions, and sometimes those functions would have to alter the "more global" version of the variable. Doing this would indeed be slower, but probably not very much. I suspect all the parameter passing would be awkward. But it's worth stating that my predecessor, Martin Stjernholm, extracted c-guess-continued-construct from c-guess-basic-syntax, which shows that it is possible. > -- > Best regards, > Tadeus -- Alan Mackenzie (Nuremberg, Germany).