unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#8923: 23.3; Indentation c++0x
@ 2011-06-23  0:18 Nicolai Bodd
  2019-10-01 20:11 ` Stefan Kangas
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolai Bodd @ 2011-06-23  0:18 UTC (permalink / raw)
  To: 8923

[-- Attachment #1: Type: text/plain, Size: 310 bytes --]

Emacs should support a c++0x, when it comes to indentation of lamdas and
for_each.


In GNU Emacs 23.3.1 (i386-mingw-nt6.1.7601)
 of 2011-03-10 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 6.1.7601
configured using `configure --with-gcc (4.5) --no-opt --cflags
-Ic:/imagesupport/include'

[-- Attachment #2: Type: text/html, Size: 350 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#8923: 23.3; Indentation c++0x
  2011-06-23  0:18 bug#8923: 23.3; Indentation c++0x Nicolai Bodd
@ 2019-10-01 20:11 ` Stefan Kangas
  2019-10-02  5:50   ` Nicolai Bodd
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Kangas @ 2019-10-01 20:11 UTC (permalink / raw)
  To: Nicolai Bodd, Alan Mackenzie; +Cc: 8923

Nicolai Bodd <nicolai.bodd@gmail.com> writes:

> Emacs should support a c++0x, when it comes to indentation of lamdas and
> for_each.

Hi Alan,

This was reported 8 years ago.  Is this wishlist item still relevant,
or has support for this been added since?

Best regards,
Stefan Kangas





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#8923: 23.3; Indentation c++0x
  2019-10-01 20:11 ` Stefan Kangas
@ 2019-10-02  5:50   ` Nicolai Bodd
  2019-10-02  9:37     ` Stefan Kangas
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolai Bodd @ 2019-10-02  5:50 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Alan Mackenzie, 8923

I honestly don’t know if this has been resolved. I am fine with this item being closed.


> 1. okt. 2019 kl. 22:11 skrev Stefan Kangas <stefan@marxist.se>:
> 
> Nicolai Bodd <nicolai.bodd@gmail.com> writes:
> 
>> Emacs should support a c++0x, when it comes to indentation of lamdas and
>> for_each.
> 
> Hi Alan,
> 
> This was reported 8 years ago.  Is this wishlist item still relevant,
> or has support for this been added since?
> 
> Best regards,
> Stefan Kangas





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#8923: 23.3; Indentation c++0x
  2019-10-02  5:50   ` Nicolai Bodd
@ 2019-10-02  9:37     ` Stefan Kangas
  2019-10-02 19:41       ` Alan Mackenzie
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Kangas @ 2019-10-02  9:37 UTC (permalink / raw)
  To: Nicolai Bodd; +Cc: Alan Mackenzie, 8923

Nicolai Bodd <nicolai.bodd@gmail.com> writes:

> 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.

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?

Best regards,
Stefan Kangas





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#8923: 23.3; Indentation c++0x
  2019-10-02  9:37     ` Stefan Kangas
@ 2019-10-02 19:41       ` Alan Mackenzie
  2019-10-03  3:48         ` Stefan Kangas
  0 siblings, 1 reply; 6+ messages in thread
From: Alan Mackenzie @ 2019-10-02 19:41 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Nicolai Bodd, 8923

Hello Stefan and Nicolai.

On Wed, Oct 02, 2019 at 11:37:02 +0200, Stefan Kangas wrote:
> Nicolai Bodd <nicolai.bodd@gmail.com> 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 : <collection>) {}

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).





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#8923: 23.3; Indentation c++0x
  2019-10-02 19:41       ` Alan Mackenzie
@ 2019-10-03  3:48         ` Stefan Kangas
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Kangas @ 2019-10-03  3:48 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: 8923-done, Nicolai Bodd

Hi Alan,

Alan Mackenzie <acm@muc.de> writes:

> > 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 : <collection>) {}
>
> have both been implemented.

Thanks; I'm therefore closing this bug report.

> 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.

Interesting.  I'll try to remember that.

Best regards,
Stefan Kangas





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-10-03  3:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-23  0:18 bug#8923: 23.3; Indentation c++0x Nicolai Bodd
2019-10-01 20:11 ` Stefan Kangas
2019-10-02  5:50   ` Nicolai Bodd
2019-10-02  9:37     ` Stefan Kangas
2019-10-02 19:41       ` Alan Mackenzie
2019-10-03  3:48         ` Stefan Kangas

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).