From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#8923: 23.3; Indentation c++0x Date: Wed, 2 Oct 2019 19:41:31 +0000 Message-ID: <20191002194131.GA15875@ACM> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="157274"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: Nicolai Bodd , 8923@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 02 21:42:17 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iFkVt-000eo1-CQ for geb-bug-gnu-emacs@m.gmane.org; Wed, 02 Oct 2019 21:42:17 +0200 Original-Received: from localhost ([::1]:58852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFkVs-0001Wk-1y for geb-bug-gnu-emacs@m.gmane.org; Wed, 02 Oct 2019 15:42:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56277) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFkVi-0001WR-Sb for bug-gnu-emacs@gnu.org; Wed, 02 Oct 2019 15:42:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFkVh-0001bk-Oz for bug-gnu-emacs@gnu.org; Wed, 02 Oct 2019 15:42:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57800) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iFkVg-0001az-2Q; Wed, 02 Oct 2019 15:42:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iFkVf-00050T-Us; Wed, 02 Oct 2019 15:42:03 -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, 02 Oct 2019 19:42:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8923 X-GNU-PR-Package: emacs,cc-mode Original-Received: via spool by 8923-submit@debbugs.gnu.org id=B8923.157004529919207 (code B ref 8923); Wed, 02 Oct 2019 19:42:03 +0000 Original-Received: (at 8923) by debbugs.gnu.org; 2 Oct 2019 19:41:39 +0000 Original-Received: from localhost ([127.0.0.1]:38388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFkVH-0004zj-8K for submit@debbugs.gnu.org; Wed, 02 Oct 2019 15:41:39 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:11811 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1iFkVF-0004za-4L for 8923@debbugs.gnu.org; Wed, 02 Oct 2019 15:41:37 -0400 Original-Received: (qmail 62982 invoked by uid 3782); 2 Oct 2019 19:41:34 -0000 Original-Received: from acm.muc.de (p4FE15FED.dip0.t-ipconnect.de [79.225.95.237]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 02 Oct 2019 21:41:31 +0200 Original-Received: (qmail 16085 invoked by uid 1000); 2 Oct 2019 19:41:31 -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: 209.51.188.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:168175 Archived-At: Hello Stefan and Nicolai. On Wed, Oct 02, 2019 at 11:37:02 +0200, Stefan Kangas wrote: > Nicolai Bodd writes: Nicolai, I'm sorry I missed your bug report originally. At the time, I had no idea how to go about implementing (what was to become) C++11. I didn't really get started on the job until spring 2012. > > I honestly don’t know if this has been resolved. I am fine with this > > item being closed. > [...] > > >> Emacs should support a c++0x, when it comes to indentation of > > >> lamdas and for_each. > Thanks for reporting back. I think we should try to get confirmation > that this has indeed been implemented first, so let's hear what Alan > has to say. Yes, lambda forms and the "colon" form of for: for (foo : ) {} have both been implemented. > In the meantime, it would be helpful if we could have an example of > some code where this indentation applies. That would help us verify > that it works as expected. Would you be willing to help provide such > an example? There is an extensive regression test suite for CC Mode at http://cc-mode.sourceforge.net, contained in the CC Mode repository. It focuses almost entirely on (static) indentation and fontification. It gets updated fairly frequently, as new bugs come to light. Examples of C++ lambda expression and for statements are in this test suite. E.g., forloop-7.cc looks like: static void DoFoo(const CXXRecordDecl *Class) { for (auto *Friend : Class->friends()) {} } > Best regards, > Stefan Kangas -- Alan Mackenzie (Nuremberg, Germany).