From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephane A Newsgroups: gmane.emacs.bugs Subject: bug#42581: Wrong C++ indentation when using class MY_DLL_EXPORT_MACRO foo Date: Tue, 28 Jul 2020 18:06:52 +0200 Message-ID: References: <83zh7jg17u.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000434e2505ab82a1a9" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4510"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 42581@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 28 18:34:19 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k0SYS-0000zC-JP for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 28 Jul 2020 18:34:16 +0200 Original-Received: from localhost ([::1]:44316 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k0SYR-0008OH-CT for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 28 Jul 2020 12:34:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38814) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k0SYG-0008Nx-CF for bug-gnu-emacs@gnu.org; Tue, 28 Jul 2020 12:34:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47391) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k0SYE-0004MF-W5 for bug-gnu-emacs@gnu.org; Tue, 28 Jul 2020 12:34:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k0SYE-00054H-TM for bug-gnu-emacs@gnu.org; Tue, 28 Jul 2020 12:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephane A Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Jul 2020 16:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42581 X-GNU-PR-Package: emacs Original-Received: via spool by 42581-submit@debbugs.gnu.org id=B42581.159595403219432 (code B ref 42581); Tue, 28 Jul 2020 16:34:02 +0000 Original-Received: (at 42581) by debbugs.gnu.org; 28 Jul 2020 16:33:52 +0000 Original-Received: from localhost ([127.0.0.1]:58933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k0SY1-00053C-VB for submit@debbugs.gnu.org; Tue, 28 Jul 2020 12:33:52 -0400 Original-Received: from mail-il1-f180.google.com ([209.85.166.180]:36880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k0S8C-0004NI-T7 for 42581@debbugs.gnu.org; Tue, 28 Jul 2020 12:07:12 -0400 Original-Received: by mail-il1-f180.google.com with SMTP id r12so16646742ilh.4 for <42581@debbugs.gnu.org>; Tue, 28 Jul 2020 09:07:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cF1+DAcUrORctt4/2iBSS7OM+zPnjQAkrVZhYtUC9ZE=; b=i+KBZyhQKcQ4L8T03K36vsyLzobukDVTl7OEPmqirfStPoo69f+HgwAa03WLu/mHRw FeKtfVfKy7H002rcjYxro3dzh9wG/UatZa0D0vFiS0k/uF9AgmYPI7tgqM6V1udI0Yde ZsZlBDe5nNYkW1g5s5n1S50ZYlMOWXg18RZb0TYMrk1TCMkbNxt72gxf+dBxgkU3C0Bm T5BIfOw//a0rSmSKmE3jTqoB/rZP9VAwyU7JeOhBvINdLXfa5AL42ZxalAm/leeYsFoK pcKOy7dY2a+wfE/hABjSeu6SKKN7ynvQxOeHsJkSZggjNvIOmLoS/J3NSP6LboEewBOR ve0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cF1+DAcUrORctt4/2iBSS7OM+zPnjQAkrVZhYtUC9ZE=; b=KjZDnCZe8Km3vyW+JSGnAutaeLQnSiR4WAgBhOygy2WxTTwt37UQL4yWLQz6bvf1Vm ATzF0PvKo9JWwXNKMwVeUm3wgz6dVgDuSJ+4WFJ3+pwK5rfZ424j1SByZm8rHbdM8g3Y Qxz2woiggNBc2gDVo6zts8VJgheXZpkm0+zWoKLTUUq4smz8fo3AxF0+J4axi9wPqP/d ZH/xRcYtVqD1vgH/GUgUuV6CDC2DPixMOeK8RUMT18mna7ckEomA8zbqzO6tcTcitBTt MVUrelYnLnLwHrKyjh63yHiqZZ8JA5ID2gpKTI0v0biFjGdzYKoX0X/3/nGZkqH+9fLr tMsQ== X-Gm-Message-State: AOAM531zx5/HllcDfuXsD0lCMcS6jHx6sjQ0igIPULSn5aLyPsOIJfJF nOlAQCJy02tIkIkhaXEgC4i4la7CXzTpwDwxQLI= X-Google-Smtp-Source: ABdhPJx0ogmPI922CFjLKxrpf2yXUJUcTty286EPd15HzeSyVTlR5KecgI0Laadj0r/LUOQysXSV9QK74XHj493tbyE= X-Received: by 2002:a05:6e02:88:: with SMTP id l8mr6587329ilm.69.1595952423193; Tue, 28 Jul 2020 09:07:03 -0700 (PDT) In-Reply-To: <83zh7jg17u.fsf@gnu.org> X-Mailman-Approved-At: Tue, 28 Jul 2020 12:33:44 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:183625 Archived-At: --000000000000434e2505ab82a1a9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=C3=A9phane On Tue, Jul 28, 2020 at 4:31 PM Eli Zaretskii wrote: > > From: Stephane A > > 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? > --000000000000434e2505ab82a1a9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

Thank you for the adv= ice :) I didn't know this one.

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

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

Regards,

St=C3=A9phane<= br>

On Tue, Jul 28, 2020 at 4:31 PM Eli Zaretskii <eliz@gnu.org> wrote:
> From: Stephane A <a.stephane.fsw@gmail.com><= br> > 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?
--000000000000434e2505ab82a1a9--