GNU bug report logs - #26674
24.3; Inconsistent indentation in C++ mode initialization lists

Previous Next

Packages: emacs, cc-mode;

Reported by: Greg Long <gregory.g.long <at> gmail.com>

Date: Thu, 27 Apr 2017 00:39:02 UTC

Severity: normal

Tags: unreproducible

Found in version 24.3

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

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 26674 in the body.
You can then email your comments to 26674 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#26674; Package emacs. (Thu, 27 Apr 2017 00:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Greg Long <gregory.g.long <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 27 Apr 2017 00:39:02 GMT) Full text and rfc822 format available.

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

From: Greg Long <gregory.g.long <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3; Inconsistent indentation in C++ mode initialization lists
Date: Wed, 26 Apr 2017 17:32:42 -0700
[Message part 1 (text/plain, inline)]
When creating an initialization list for a constructor in C++ mode there
is an inconsistency in indentation. In the following code:

foo::foo()
: m_test_var0(100)
, m_test_var1(100)
, m_test_var2(100)
, m_test_var3(100)
, m_test_var4(100)
, m_test_var5(100)
, m_test_var6(100)
, m_test_var7(100)
, m_test_var8(100)
, m_test_var9(100)
, m_test_var10(100)
, m_test_var11(100)
, m_test_var12(100)
, m_test_var13(100)
, m_test_var14(100)
, m_test_var15(100)
, m_test_var16(100)
, m_test_var17(100)
, m_test_var18(100)
, m_test_var19(100)
, m_test_var20(100)
, m_test_var21(100)
, m_test_var22(100)
, m_test_var23(100)
, m_test_var24(100)
, m_test_var25(100)
  , m_test_var26(100)
{}

variables inserted before m_test_var25 are not indented, while
ones after m_test_var25 are indented (in the same style as m_test_var26).
The
indentation doesn't always happen after exactly 26 variables and the
size of indentation is not always 2 spaces, instead the
behavior seems to depend on the length of the variable strings. However
the indentation will always happen eventually. It appears the actual
values within the parentheses don't matter, either.


In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7)
 of 2014-03-07 on lamiak, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11803000
System Description: Ubuntu 14.04.5 LTS

Configured using:
 `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu'
 '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
 '--localstatedir=/var/lib' '--infodir=/usr/share/info'
 '--mandir=/usr/share/man' '--with-pop=yes'
 '--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3/site-lisp:/usr/share/emacs/site-lisp'
 '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes'
 '--with-x-toolkit=gtk3' '--with-toolkit-scroll-bars'
 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector
 --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall'
 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro'
 'CPPFLAGS=-D_FORTIFY_SOURCE=2''

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: C++/l

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
<C-end> <up> <up> <up> <end> <up> <return> , SPC C-_
C-_ C-_ <down> <return> , SPC C-_ C-_ C-_ M-x r e p
o r t - e m a c s - b u g <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Loading cc-langs...done
Loading vc-git...done
Mark set
Undo! [6 times]

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message cl-macs gv format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils vc-git cc-langs cl cl-lib cc-mode cc-fonts
easymenu cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars
cc-defs time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel
x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list
newcomment lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org:
bug#26674; Package emacs,cc-mode. (Fri, 23 Oct 2020 01:49:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: 26674 <at> debbugs.gnu.org
Subject: [Stefan Kangas] Re: bug#26674: 24.3; Inconsistent indentation in C++
 mode initialization lists
Date: Thu, 22 Oct 2020 18:48:39 -0700
[ Forwarding to the bug tracker since I forgot to include it in Cc. ]

-------------------- Start of forwarded message --------------------
From: Stefan Kangas <stefan <at> marxist.se>
To: Greg Long <gregory.g.long <at> gmail.com>
Subject: Re: bug#26674: 24.3; Inconsistent indentation in C++ mode
 initialization lists
Date: Mon, 10 Aug 2020 13:44:18 -0700

Greg Long <gregory.g.long <at> gmail.com> writes:

> When creating an initialization list for a constructor in C++ mode there
> is an inconsistency in indentation. In the following code:
>
> foo::foo()
> : m_test_var0(100)
> , m_test_var1(100)
> , m_test_var2(100)
> , m_test_var3(100)
> , m_test_var4(100)
> , m_test_var5(100)
> , m_test_var6(100)
> , m_test_var7(100)
> , m_test_var8(100)
> , m_test_var9(100)
> , m_test_var10(100)
> , m_test_var11(100)
> , m_test_var12(100)
> , m_test_var13(100)
> , m_test_var14(100)
> , m_test_var15(100)
> , m_test_var16(100)
> , m_test_var17(100)
> , m_test_var18(100)
> , m_test_var19(100)
> , m_test_var20(100)
> , m_test_var21(100)
> , m_test_var22(100)
> , m_test_var23(100)
> , m_test_var24(100)
> , m_test_var25(100)
>   , m_test_var26(100)
> {}
>
> variables inserted before m_test_var25 are not indented, while
> ones after m_test_var25 are indented (in the same style as m_test_var26). The
> indentation doesn't always happen after exactly 26 variables and the
> size of indentation is not always 2 spaces, instead the
> behavior seems to depend on the length of the variable strings. However
> the indentation will always happen eventually. It appears the actual
> values within the parentheses don't matter, either.

I can't reproduce this on current master.  Are you still seeing this
using a recent version of Emacs?

If I don't hear back from you within a couple of weeks, I'll just
close this bug as unreproducible.

Best regards,
Stefan Kangas
-------------------- End of forwarded message --------------------




Information forwarded to bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org:
bug#26674; Package emacs,cc-mode. (Fri, 23 Oct 2020 01:59:01 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: 26674 <at> debbugs.gnu.org
Subject: Re: bug#26674: [Stefan Kangas] Re: bug#26674: 24.3; Inconsistent
 indentation in C++ mode initialization lists
Date: Thu, 22 Oct 2020 18:58:44 -0700
tags 26674 + unreproducible
close 26674
thanks

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

> I can't reproduce this on current master.  Are you still seeing this
> using a recent version of Emacs?
>
> If I don't hear back from you within a couple of weeks, I'll just
> close this bug as unreproducible.

More information was requested, but none was given within 2 months, so
I'm closing this bug.  If this is still an issue, please reply to this
email (use "Reply to all" in your email client) and we can reopen the
bug report.

Best regards,
Stefan Kangas




Added tag(s) unreproducible. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Fri, 23 Oct 2020 01:59:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 26674 <at> debbugs.gnu.org and Greg Long <gregory.g.long <at> gmail.com> Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Fri, 23 Oct 2020 01:59: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, 20 Nov 2020 12:24:10 GMT) Full text and rfc822 format available.

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

Previous Next


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