bug#42581: Wrong C++ indentation when using class MY_DLL_EXPORT_MACRO foo

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#42581: Wrong C++ indentation when using class MY_DLL_EXPORT_MACRO foo

Eli Zaretskii
> From: Stephane A <[hidden email]>
> Date: Tue, 28 Jul 2020 13:34:43 +0200
>
> There is a C++ indentation problem when using:
> class MY_EXPORT_DLL_MACRO foo {
> // with a
> public:
> foo(); // This line is not indented
> // section.
> };
>
> The problem is not reproduced if, either:
>
> * the "MY_DLL_EXPORT_MACRO" is removed; or
> * the "public:" section is removed

Does it help to add MY_DLL_EXPORT_MACRO to the list in
c-noise-macro-names?



Reply | Threaded
Open this post in threaded view
|

bug#42581: Wrong C++ indentation when using class MY_DLL_EXPORT_MACRO foo

Stephane A
Hello,

Thank you for the advice :) I didn't know this one.

We have on *_EXPORT macro per module. So I would need to configure noise macros by regexp.

I found c-make-noise-macro-regexps in the Emacs documentation but don't know how to set it up in my emacs file since the syntax is not documented. I though of adding a call to the c++-mode-hook.

Regards,

St├ęphane

On Tue, Jul 28, 2020 at 4:31 PM Eli Zaretskii <[hidden email]> wrote:
> From: Stephane A <[hidden email]>
> Date: Tue, 28 Jul 2020 13:34:43 +0200
>
> There is a C++ indentation problem when using:
> class MY_EXPORT_DLL_MACRO foo {
> // with a
> public:
> foo(); // This line is not indented
> // section.
> };
>
> The problem is not reproduced if, either:
>
> * the "MY_DLL_EXPORT_MACRO" is removed; or
> * the "public:" section is removed

Does it help to add MY_DLL_EXPORT_MACRO to the list in
c-noise-macro-names?