* bug#26674: 24.3; Inconsistent indentation in C++ mode initialization lists
@ 2017-04-27 0:32 ` Greg Long
2020-10-23 1:48 ` bug#26674: [Stefan Kangas] " Stefan Kangas
0 siblings, 1 reply; 3+ messages in thread
From: Greg Long @ 2017-04-27 0:32 UTC (permalink / raw)
To: 26674
[-- Attachment #1: Type: text/plain, Size: 4158 bytes --]
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)
[-- Attachment #2: Type: text/html, Size: 5751 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread