GNU bug report logs - #14008
Better autoindent for C++11 code?

Previous Next

Packages: cc-mode, emacs;

Reported by: Andrew Pennebaker <andrew.pennebaker <at> gmail.com>

Date: Wed, 20 Mar 2013 15:41:01 UTC

Severity: wishlist

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefan Kangas <stefan <at> marxist.se>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#14008: closed (Better autoindent for C++11 code?)
Date: Thu, 07 Nov 2019 23:42:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 08 Nov 2019 00:41:21 +0100
with message-id <87ftizz23i.fsf <at> marxist.se>
and subject line Re: bug#14008: Better autoindent for C++11 code?
has caused the debbugs.gnu.org bug report #14008,
regarding Better autoindent for C++11 code?
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
14008: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14008
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Andrew Pennebaker <andrew.pennebaker <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Better autoindent for C++11 code?
Date: Wed, 20 Mar 2013 11:38:58 -0400
[Message part 3 (text/plain, inline)]
C++11 introduced lambda syntax []() { ... } and other strange things that
Emacs indents strangely.

for_each(range.begin(), range.end(), [=](int i) {
    cout << strings[i] << endl;
  });

I would like the final line `});` to have the same indentation level as the
first line `for_each...`.

Here's another example:

for_each(range.begin(), range.end(), [&](int i) {
             std::async(
                        launch::async,
                        [&]() { strings[i] = fizzy(i); }
                        );
  });

The arguments to std::async and its closing parenthesis are indented much
too far; I would like them indented only one level further than where
std::async is itself indented. Any tips for achieving this?

-- 
Cheers,

Andrew Pennebaker
www.yellosoft.us
[Message part 4 (text/html, inline)]
[Message part 5 (message/rfc822, inline)]
From: Stefan Kangas <stefan <at> marxist.se>
To: Alan Mackenzie <acm <at> muc.de>
Cc: Andrew Pennebaker <andrew.pennebaker <at> gmail.com>, 14008-done <at> debbugs.gnu.org
Subject: Re: bug#14008: Better autoindent for C++11 code?
Date: Fri, 08 Nov 2019 00:41:21 +0100
Alan Mackenzie <acm <at> muc.de> writes:

>> Do you think there is anything more to do here, or should this bug be
>> closed?
>
> I think the bug should now be closed.

Thanks, I'm therefore closing this bug now.

Best regards,
Stefan Kangas


This bug report was last modified 5 years and 201 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.