unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* 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

* bug#26674: [Stefan Kangas] Re: bug#26674: 24.3; Inconsistent indentation in C++ mode initialization lists
  2017-04-27  0:32 ` bug#26674: 24.3; Inconsistent indentation in C++ mode initialization lists Greg Long
@ 2020-10-23  1:48   ` Stefan Kangas
  2020-10-23  1:58     ` Stefan Kangas
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Kangas @ 2020-10-23  1:48 UTC (permalink / raw)
  To: 26674

[ Forwarding to the bug tracker since I forgot to include it in Cc. ]

-------------------- Start of forwarded message --------------------
From: Stefan Kangas <stefan@marxist.se>
To: Greg Long <gregory.g.long@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@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 --------------------





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#26674: [Stefan Kangas] Re: bug#26674: 24.3; Inconsistent indentation in C++ mode initialization lists
  2020-10-23  1:48   ` bug#26674: [Stefan Kangas] " Stefan Kangas
@ 2020-10-23  1:58     ` Stefan Kangas
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Kangas @ 2020-10-23  1:58 UTC (permalink / raw)
  To: 26674

tags 26674 + unreproducible
close 26674
thanks

Stefan Kangas <stefan@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





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-23  1:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CADwFkmnMXx9OUKL3+RQq0wcSsnkdgfxjZpn24cV=evqiSEt+Pg@mail.gmail.com>
2017-04-27  0:32 ` bug#26674: 24.3; Inconsistent indentation in C++ mode initialization lists Greg Long
2020-10-23  1:48   ` bug#26674: [Stefan Kangas] " Stefan Kangas
2020-10-23  1:58     ` Stefan Kangas

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).