GNU bug report logs - #48992
cc-mode initialize list indentation bug

Previous Next

Packages: cc-mode, emacs;

Reported by: 王斌波 <binbowang1987 <at> 163.com>

Date: Sun, 13 Jun 2021 00:13:01 UTC

Severity: minor

Tags: fixed

Fixed in version 28.1

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

Bug is archived. No further changes may be made.

Full log


Message #11 received at 48992 <at> debbugs.gnu.org (full text, mbox):

From: 王斌波 <binbowang1987 <at> 163.com>
To: "acm <at> muc.de" <acm <at> muc.de>
Cc: "acm <at> muc.de" <acm <at> muc.de>, "48992 <at> debbugs.gnu.org" <48992 <at> debbugs.gnu.org>
Subject: Re:  bug#48992: cc-mode initialize list indentation bug
Date: Sat, 28 Aug 2021 09:40:20 +0800 (GMT+08:00)
[Message part 1 (text/plain, inline)]
Hello, Alan.
  Thank you for your great work. I applyed the path, and the problem fixed. What i did is like this:
  1. apply the patch
  2. recompile the cc-engine.el
  3. restart emacs, edit a real cpp file. The indentation was correct now.


Binbo Wang (ChongQing, China).
On 8/22/2021 01:57,Alan Mackenzie<acm <at> muc.de> wrote:
Hello, Binbowang.

On Sun, Jun 13, 2021 at 07:29:55 +0800, 王斌波 wrote:
class A {
public:
static std::set<int> setA;
};


std::set<int> A::setA {
1,
2,
3
}


The indentation in setA initialize list is not correct. I want it like the following.
class A {
public:
static std::set<int> setA;
};


std::set<int> A::setA {
1,
2,
3
}

The indentation was indeed incorrect.  CC Mode was mis-analysing the
brace list as a function.  I think the patch attached should fix this.

Would you please apply the patch to your CC Mode (in directory
..../emacs/lisp/progmodes), byte compile that file, load it into your
Emacs and try it out on your real C++ source code.  Then please let me
know if the bug is indeed fixed.  (If you would like any help with the
patching or byte compilation, feel free to send me private email.)


In GNU Emacs 27.1 (build 1, x86_64-w64-mingw32)
of 2020-08-22 built on CIRROCUMULUS
Repository revision: 86d8d76aa36037184db0b2897c434cdaab1a9ae8
Repository branch: HEAD
Windowing system distributor 'Microsoft Corp.', version 10.0.19042
System Description: Microsoft Windows 10 Pro (v10.0.2009.19042.1052)

[ .... ]

--
Alan Mackenzie (Nuremberg, Germany).

[Message part 2 (text/html, inline)]

This bug report was last modified 3 years and 319 days ago.

Previous Next


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