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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs,cc-mode; Reported by: Greg Long <gregory.g.long@HIDDEN>; dated Thu, 27 Apr 2017 00:39:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 27 Apr 2017 00:38:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 26 20:38:52 2017
Received: from localhost ([127.0.0.1]:42160 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d3XSO-0003d7-32
	for submit <at> debbugs.gnu.org; Wed, 26 Apr 2017 20:38:52 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33585)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory.g.long@HIDDEN>) id 1d3XMb-0003Ui-Tk
 for submit <at> debbugs.gnu.org; Wed, 26 Apr 2017 20:32:54 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <gregory.g.long@HIDDEN>) id 1d3XMV-0008Dq-8q
 for submit <at> debbugs.gnu.org; Wed, 26 Apr 2017 20:32:48 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:57727)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <gregory.g.long@HIDDEN>)
 id 1d3XMV-0008De-5A
 for submit <at> debbugs.gnu.org; Wed, 26 Apr 2017 20:32:47 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:52783)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <gregory.g.long@HIDDEN>) id 1d3XMT-0003rK-AB
 for bug-gnu-emacs@HIDDEN; Wed, 26 Apr 2017 20:32:46 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <gregory.g.long@HIDDEN>) id 1d3XMR-0008Cs-Q8
 for bug-gnu-emacs@HIDDEN; Wed, 26 Apr 2017 20:32:45 -0400
Received: from mail-ua0-x229.google.com ([2607:f8b0:400c:c08::229]:33176)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <gregory.g.long@HIDDEN>)
 id 1d3XMR-0008Cj-KZ
 for bug-gnu-emacs@HIDDEN; Wed, 26 Apr 2017 20:32:43 -0400
Received: by mail-ua0-x229.google.com with SMTP id j59so10776355uad.0
 for <bug-gnu-emacs@HIDDEN>; Wed, 26 Apr 2017 17:32:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=65AyoGjEznWpymEdOOG8JHxCbMTMUGonu+lxtE86YAw=;
 b=pGCMi6ZjApU2yThE9H8D6fHeKfbzK7shkDwilYihuI8dMfrSdz27JJjUf64rwbA2hK
 i6NxdtxPEVuzCO6zVMzlGMIXtapUthCGpfgpK5nsILyXavEJK4LHDIWvhR+eUB+Q8TQ0
 6SStr0G0Uw/SfUB5wMqnULHUwCBxsqBBYSzdwtXKAaKjqr5YeyCenR9/6xp0TF597BlN
 cLax8fj1v7thZwNMJU/aEozENfszEtRt1pOKIfODlTWmy/EGfYZwKC+vcPFpcS/5Pr+M
 tVUk/iPmTzTzqvHy9TzEDfL/aufaV5e055JxOTIcznmj5lQ8uMrN24G0txpd79r+RdBJ
 M3ng==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=65AyoGjEznWpymEdOOG8JHxCbMTMUGonu+lxtE86YAw=;
 b=enF2UrGAghLRk5H1iXYHNCKesc2qbiiP3ZyeefdVYeP11wDvLzzWF+hNztmgb4A8Mr
 IJCa9QTBsj05JlQ6OkYazB5+ViH//wkPHEm6tFk7fyF08vltpNrc4w3U4nCKnZ2kOk+w
 C7kcqodknH+FTg0XYyPa+Q5a87q4fudYkjnmNz/YIk5VUN8yhhPNSXiC4JqDqikSxdhA
 r9jc5naV7sIcb0BxpYBq4dE/F6DpMEv8fiQCfH8GZzfawD42vOgeKdcdZIxfKJ0sv7uX
 5JYA0E6kcXkj6jPK+dapAikC4GiJ9LSTKqYsPRzhk00HOEE5/K0nkmS/PGgz1ZUTMEwN
 xWbQ==
X-Gm-Message-State: AN3rC/4EjIyHsroIPRJuijjHtuPTmw7w+6q6CgxZEiAuFtU5lfgQQG/3
 mPaGFspnNvAQ85Fn5CFaqsR+c/PnQawE
X-Received: by 10.159.59.11 with SMTP id i11mr1557272uah.50.1493253162398;
 Wed, 26 Apr 2017 17:32:42 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.176.85.30 with HTTP; Wed, 26 Apr 2017 17:32:42 -0700 (PDT)
From: Greg Long <gregory.g.long@HIDDEN>
Date: Wed, 26 Apr 2017 17:32:42 -0700
Message-ID: <CAHWYW93=mR_mKCn5RQkxGmpAWaCtB1PviNy1dDsreacL1_kwUg@HIDDEN>
Subject: 24.3; Inconsistent indentation in C++ mode initialization lists
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/alternative; boundary=f403043c4f484df8ec054e1b1869
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Wed, 26 Apr 2017 20:38:51 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

--f403043c4f484df8ec054e1b1869
Content-Type: text/plain; charset=UTF-8

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)

--f403043c4f484df8ec054e1b1869
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>When creating an initialization list for a constructo=
r in C++ mode there</div><div>is an inconsistency in indentation. In the fo=
llowing code:</div><div><br></div><div>foo::foo()</div><div>: m_test_var0(1=
00)</div><div>, m_test_var1(100)</div><div>, m_test_var2(100)</div><div>, m=
_test_var3(100)</div><div>, m_test_var4(100)</div><div>, m_test_var5(100)</=
div><div>, m_test_var6(100)</div><div>, m_test_var7(100)</div><div>, m_test=
_var8(100)</div><div>, m_test_var9(100)</div><div>, m_test_var10(100)</div>=
<div>, m_test_var11(100)</div><div>, m_test_var12(100)</div><div>, m_test_v=
ar13(100)</div><div>, m_test_var14(100)</div><div>, m_test_var15(100)</div>=
<div>, m_test_var16(100)</div><div>, m_test_var17(100)</div><div>, m_test_v=
ar18(100)</div><div>, m_test_var19(100)</div><div>, m_test_var20(100)</div>=
<div>, m_test_var21(100)</div><div>, m_test_var22(100)</div><div>, m_test_v=
ar23(100)</div><div>, m_test_var24(100)</div><div>, m_test_var25(100)</div>=
<div>=C2=A0 , m_test_var26(100)</div><div>{}</div><div><br></div><div>varia=
bles inserted before m_test_var25 are not indented, while</div><div>ones af=
ter m_test_var25 are indented (in the same style as m_test_var26). The</div=
><div>indentation doesn&#39;t always happen after exactly 26 variables and =
the</div><div>size of indentation is not always 2 spaces, instead the</div>=
<div>behavior seems to depend on the length of the variable strings. Howeve=
r</div><div>the indentation will always happen eventually. It appears the a=
ctual</div><div>values within the parentheses don&#39;t matter, either.</di=
v><div><br></div><div><br></div><div>In GNU Emacs 24.3.1 (x86_64-pc-linux-g=
nu, GTK+ Version 3.10.7)</div><div>=C2=A0of 2014-03-07 on lamiak, modified =
by Debian</div><div>Windowing system distributor `The X.Org Foundation&#39;=
, version 11.0.11803000</div><div>System Description:<span class=3D"gmail-A=
pple-tab-span" style=3D"white-space:pre">	</span>Ubuntu 14.04.5 LTS</div><d=
iv><br></div><div>Configured using:</div><div>=C2=A0`configure &#39;--build=
&#39; &#39;x86_64-linux-gnu&#39; &#39;--build&#39; &#39;x86_64-linux-gnu&#3=
9;</div><div>=C2=A0&#39;--prefix=3D/usr&#39; &#39;--sharedstatedir=3D/var/l=
ib&#39; &#39;--libexecdir=3D/usr/lib&#39;</div><div>=C2=A0&#39;--localstate=
dir=3D/var/lib&#39; &#39;--infodir=3D/usr/share/info&#39;</div><div>=C2=A0&=
#39;--mandir=3D/usr/share/man&#39; &#39;--with-pop=3Dyes&#39;</div><div>=C2=
=A0&#39;--enable-locallisppath=3D/etc/emacs24:/etc/emacs:/usr/local/share/e=
macs/24.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3/=
site-lisp:/usr/share/emacs/site-lisp&#39;</div><div>=C2=A0&#39;--with-crt-d=
ir=3D/usr/lib/x86_64-linux-gnu&#39; &#39;--with-x=3Dyes&#39;</div><div>=C2=
=A0&#39;--with-x-toolkit=3Dgtk3&#39; &#39;--with-toolkit-scroll-bars&#39;</=
div><div>=C2=A0&#39;build_alias=3Dx86_64-linux-gnu&#39; &#39;CFLAGS=3D-g -O=
2 -fstack-protector</div><div>=C2=A0--param=3Dssp-buffer-size=3D4 -Wformat =
-Werror=3Dformat-security -Wall&#39;</div><div>=C2=A0&#39;LDFLAGS=3D-Wl,-Bs=
ymbolic-functions -Wl,-z,relro&#39;</div><div>=C2=A0&#39;CPPFLAGS=3D-D_FORT=
IFY_SOURCE=3D2&#39;&#39;</div><div><br></div><div>Important settings:</div>=
<div>=C2=A0 value of $LANG: en_US.UTF-8</div><div>=C2=A0 value of $XMODIFIE=
RS: @im=3Dibus</div><div>=C2=A0 locale-coding-system: utf-8-unix</div><div>=
=C2=A0 default enable-multibyte-characters: t</div><div><br></div><div>Majo=
r mode: C++/l</div><div><br></div><div>Minor modes in effect:</div><div>=C2=
=A0 tooltip-mode: t</div><div>=C2=A0 mouse-wheel-mode: t</div><div>=C2=A0 t=
ool-bar-mode: t</div><div>=C2=A0 menu-bar-mode: t</div><div>=C2=A0 file-nam=
e-shadow-mode: t</div><div>=C2=A0 global-font-lock-mode: t</div><div>=C2=A0=
 font-lock-mode: t</div><div>=C2=A0 blink-cursor-mode: t</div><div>=C2=A0 a=
uto-composition-mode: t</div><div>=C2=A0 auto-encryption-mode: t</div><div>=
=C2=A0 auto-compression-mode: t</div><div>=C2=A0 line-number-mode: t</div><=
div>=C2=A0 transient-mark-mode: t</div><div>=C2=A0 abbrev-mode: t</div><div=
><br></div><div>Recent input:</div><div>&lt;C-end&gt; &lt;up&gt; &lt;up&gt;=
 &lt;up&gt; &lt;end&gt; &lt;up&gt; &lt;return&gt; , SPC C-_=C2=A0</div><div=
>C-_ C-_ &lt;down&gt; &lt;return&gt; , SPC C-_ C-_ C-_ M-x r e p=C2=A0</div=
><div>o r t - e m a c s - b u g &lt;return&gt;</div><div><br></div><div>Rec=
ent messages:</div><div>For information about GNU Emacs and the GNU system,=
 type C-h C-a.</div><div>Loading cc-langs...done</div><div>Loading vc-git..=
.done</div><div>Mark set</div><div>Undo! [6 times]</div><div><br></div><div=
>Load-path shadows:</div><div>None found.</div><div><br></div><div>Features=
:</div><div>(shadow sort gnus-util mail-extr emacsbug message cl-macs gv fo=
rmat-spec</div><div>rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-p=
arse rfc2231</div><div>mailabbrev gmm-utils mailheader sendmail rfc2047 rfc=
2045 ietf-drums</div><div>mm-util mail-prsvr mail-utils vc-git cc-langs cl =
cl-lib cc-mode cc-fonts</div><div>easymenu cc-guess cc-menus cc-cmds cc-sty=
les cc-align cc-engine cc-vars</div><div>cc-defs time-date tooltip ediff-ho=
ok vc-hooks lisp-float-type mwheel</div><div>x-win x-dnd tool-bar dnd fonts=
et image regexp-opt fringe tabulated-list</div><div>newcomment lisp-mode re=
gister page menu-bar rfn-eshadow timer select</div><div>scroll-bar mouse ji=
t-lock font-lock syntax facemenu font-core frame cham</div><div>georgian ut=
f-8-lang misc-lang vietnamese tibetan thai tai-viet lao</div><div>korean ja=
panese hebrew greek romanian slovak czech european ethiopic</div><div>india=
n cyrillic chinese case-table epa-hook jka-cmpr-hook help simple</div><div>=
abbrev minibuffer loaddefs button faces cus-face macroexp files</div><div>t=
ext-properties overlay sha1 md5 base64 format env code-pages mule</div><div=
>custom widget hashtable-print-readable backquote make-network-process</div=
><div>dbusbind dynamic-setting system-font-setting font-render-setting</div=
><div>move-toolbar gtk x-toolkit x multi-tty emacs)</div><div><br></div></d=
iv>

--f403043c4f484df8ec054e1b1869--




Acknowledgement sent to Greg Long <gregory.g.long@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#26674; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

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