GNU bug report logs -
#33197
26.1; cc-mode enum indentation
Previous Next
Reported by: "Ota, Takaaki" <Takaaki.Ota <at> sony.com>
Date: Mon, 29 Oct 2018 21:31:02 UTC
Severity: normal
Tags: moreinfo
Found in version 26.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 33197 in the body.
You can then email your comments to 33197 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#33197
; Package
emacs
.
(Mon, 29 Oct 2018 21:31:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Ota, Takaaki" <Takaaki.Ota <at> sony.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 29 Oct 2018 21:31:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
The enum indentation in cc-mode used to look like this.
enum {
pDlen = sizeof pD - 1,
pIlen = sizeof pI - 1,
pMlen = sizeof pMd - 2
};
enum {
no_modifier, long_modifier, pD_modifier, pI_modifier, pM_modifier
} length_modifier = no_modifier;
This is a portion of doprnt.c in the current 26.1 source code. But
now the 26.1 cc-mode indents like this
enum {
pDlen = sizeof pD - 1,
pIlen = sizeof pI - 1,
pMlen = sizeof pMd - 2
};
enum {
no_modifier, long_modifier, pD_modifier, pI_modifier, pM_modifier
} length_modifier = no_modifier;
If the enum has a long name before the open brace it looks even worse
by wasting a lot of unnecessary spaces.
enum some_long_enum_type_name {
pDlen = sizeof pD - 1,
pIlen = sizeof pI - 1,
pMlen = sizeof pMd - 2
};
enum another_long_enum_type_name {
no_modifier, long_modifier, pD_modifier, pI_modifier, pM_modifier
} length_modifier = no_modifier;
Please consider bringing it back to how it used to be.
-Tak
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org
:
bug#33197
; Package
emacs,cc-mode
.
(Thu, 26 Nov 2020 13:01:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 33197 <at> debbugs.gnu.org (full text, mbox):
"Ota, Takaaki" <Takaaki.Ota <at> sony.com> writes:
> The enum indentation in cc-mode used to look like this.
>
> enum {
> pDlen = sizeof pD - 1,
> pIlen = sizeof pI - 1,
> pMlen = sizeof pMd - 2
> };
> enum {
> no_modifier, long_modifier, pD_modifier, pI_modifier, pM_modifier
> } length_modifier = no_modifier;
>
> This is a portion of doprnt.c in the current 26.1 source code. But
> now the 26.1 cc-mode indents like this
>
> enum {
> pDlen = sizeof pD - 1,
> pIlen = sizeof pI - 1,
> pMlen = sizeof pMd - 2
> };
I tested this in Emacs 27.1 and Emacs 28, and they both indent this code
like in the first example.
Are you still seeing this issue in Emacs 27?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) moreinfo.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 26 Nov 2020 13:01:04 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org
:
bug#33197
; Package
emacs,cc-mode
.
(Thu, 26 Nov 2020 13:15:01 GMT)
Full text and
rfc822 format available.
Message #13 received at 33197 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> I tested this in Emacs 27.1 and Emacs 28, and they both indent this code
> like in the first example.
I build Emacs 26.1 and tested there, and I could indeed see the bug you
describe.
So it looks like it's been fixed in Emacs 27, and I'm closing this bug
report. If it's still an issue, please respond to the debbugs address
and we'll reopen.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug closed, send any further explanations to
33197 <at> debbugs.gnu.org and "Ota, Takaaki" <Takaaki.Ota <at> sony.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 26 Nov 2020 13:15:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 25 Dec 2020 12:24:11 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 122 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.