GNU bug report logs - #32808
25.2; Indentation after initializer list C++

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; Reported by: richard <johndoe27328@HIDDEN>; Done: Alan Mackenzie <acm@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 32808-done <at> debbugs.gnu.org:


Received: (at 32808-done) by debbugs.gnu.org; 7 Dec 2018 17:50:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 07 12:50:08 2018
Received: from localhost ([127.0.0.1]:37257 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gVKGO-0000wX-6g
	for submit <at> debbugs.gnu.org; Fri, 07 Dec 2018 12:50:08 -0500
Received: from colin.muc.de ([193.149.48.1]:65439 helo=mail.muc.de)
 by debbugs.gnu.org with smtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1gVKGJ-0000wF-PY
 for 32808-done <at> debbugs.gnu.org; Fri, 07 Dec 2018 12:50:04 -0500
Received: (qmail 93308 invoked by uid 3782); 7 Dec 2018 17:50:02 -0000
Received: from acm.muc.de (p2E5D5936.dip0.t-ipconnect.de [46.93.89.54]) by
 colin.muc.de (tmda-ofmipd) with ESMTP;
 Fri, 07 Dec 2018 18:50:01 +0100
Received: (qmail 25776 invoked by uid 1000); 7 Dec 2018 17:45:10 -0000
Date: Fri, 7 Dec 2018 17:45:10 +0000
To: Richard Case <johndoe27328@HIDDEN>
Subject: Re: bug#32808: 25.2; Indentation after initializer list C++
Message-ID: <20181207174510.GD7949@ACM>
References: <mailman.1141.1537636151.1284.bug-gnu-emacs@HIDDEN>
 <20180922195154.44232.qmail@HIDDEN>
 <CAG4zyxFtQvxJiqUr3KrYpQXROJpmfbPYSc5_vgP1cduy=Qq78A@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CAG4zyxFtQvxJiqUr3KrYpQXROJpmfbPYSc5_vgP1cduy=Qq78A@HIDDEN>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Delivery-Agent: TMDA/1.1.12 (Macallan)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 32808-done
Cc: 32808-done <at> debbugs.gnu.org
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: -1.0 (-)

Bug fixed in master.

On Sat, Sep 22, 2018 at 15:00:02 -0500, Richard Case wrote:
> Hello Alan,

> It is the position of the closing brace on the third line.

> Thank you.

> On Sat, Sep 22, 2018, 2:51 PM Alan Mackenzie <acm@HIDDEN> wrote:

> > Hello, Richard.

> > In article <mailman.1141.1537636151.1284.bug-gnu-emacs@HIDDEN> you wrote:

> > > While creating a constructor for my class, I have a multiline
> > > initializer list. For the constructor, the indentation matches that of
> > > the list. Here's an example:

> > > Test::Test(const std::string &a) : a{a}, b{0},
> > >                                    c{"..."}, d{""} {
> > >                 /*notice the indentation*/
> >           }

> > Would you please be explicit about what is wrong with the indentation.
> > Is it the position of the closing brace on line 3, or the indentation of
> > "c{" on line 2, or something else?

> > Thanks!

> > [ .... ]

> > --
> > Alan Mackenzie (Nuremberg, Germany).





Notification sent to richard <johndoe27328@HIDDEN>:
bug acknowledged by developer. Full text available.
Reply sent to Alan Mackenzie <acm@HIDDEN>:
You have taken responsibility. Full text available.

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


Received: (at 32808) by debbugs.gnu.org; 23 Sep 2018 13:32:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 23 09:32:15 2018
Received: from localhost ([127.0.0.1]:50385 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1g44Uh-0001o6-J8
	for submit <at> debbugs.gnu.org; Sun, 23 Sep 2018 09:32:15 -0400
Received: from colin.muc.de ([193.149.48.1]:32376 helo=mail.muc.de)
 by debbugs.gnu.org with smtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1g44Ug-0001ny-9w
 for 32808 <at> debbugs.gnu.org; Sun, 23 Sep 2018 09:32:14 -0400
Received: (qmail 48706 invoked by uid 3782); 23 Sep 2018 13:32:12 -0000
Received: from acm.muc.de (p5B1467D2.dip0.t-ipconnect.de [91.20.103.210]) by
 colin.muc.de (tmda-ofmipd) with ESMTP;
 Sun, 23 Sep 2018 15:32:11 +0200
Received: (qmail 5471 invoked by uid 1000); 23 Sep 2018 13:27:45 -0000
Date: Sun, 23 Sep 2018 13:27:45 +0000
To: Richard Case <johndoe27328@HIDDEN>
Subject: Re: bug#32808: 25.2; Indentation after initializer list C++
Message-ID: <20180923132745.GA5462@ACM>
References: <mailman.1141.1537636151.1284.bug-gnu-emacs@HIDDEN>
 <20180922195154.44232.qmail@HIDDEN>
 <CAG4zyxFtQvxJiqUr3KrYpQXROJpmfbPYSc5_vgP1cduy=Qq78A@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CAG4zyxFtQvxJiqUr3KrYpQXROJpmfbPYSc5_vgP1cduy=Qq78A@HIDDEN>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Delivery-Agent: TMDA/1.1.12 (Macallan)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 32808
Cc: 32808 <at> debbugs.gnu.org
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: -1.0 (-)

Hello again, Richard.

On Sat, Sep 22, 2018 at 15:00:02 -0500, Richard Case wrote:
> Hello Alan,

> It is the position of the closing brace on the third line.

OK.  Thanks for reporting this bug!

The problem is a low level CC Mode routine, c-beginning-of-statement-1
(which does what it says) starting at the last open brace on line 2 was
only going back as far as the d of d{""}, being confused by the
initialiser list's brace blocks into thinking that a new statement began
there.

Would you please apply the following patch to your Emacs-25.2 (Note: this
patch likely won't apply cleanly to later versions of Emacs), to the file
...../emacs/lisp/progmodes/cc-engine.el.  Then please byte compile that
file and try it out with your real source code.  (If you want any help
applying the patch or byte compiling, feel free to send me private
email.)  Finally, please confirm to me that the bug is fixed, or tell me
what's still wrong.

The plan is then to install the fix into the Emacs master and emacs-26
branch.

Thanks!



--- cc-engine.el~	2017-02-03 10:25:44.000000000 +0000
+++ cc-engine.el	2018-09-23 13:01:07.642868851 +0000
@@ -1012,12 +1012,15 @@
 		(let ((before-sws-pos (point))
 		      ;; The end position of the area to search for statement
 		      ;; barriers in this round.
-		      (maybe-after-boundary-pos pos))
+		      (maybe-after-boundary-pos pos)
+		      comma-delimited)
 
 		  ;; Go back over exactly one logical sexp, taking proper
 		  ;; account of macros and escaped EOLs.
 		  (while
 		      (progn
+			(setq comma-delimited (and (not comma-delim)
+						   (eq (char-before) ?\,)))
 			(unless (c-safe (c-backward-sexp) t)
 			  ;; Give up if we hit an unbalanced block.  Since the
 			  ;; stack won't be empty the code below will report a
@@ -1053,10 +1056,23 @@
 			 ;; Just gone back over a brace block?
 			 ((and
 			   (eq (char-after) ?{)
+			   (not comma-delimited)
 			   (not (c-looking-at-inexpr-block lim nil t))
 			   (save-excursion
 			     (c-backward-token-2 1 t nil)
-			     (not (looking-at "=\\([^=]\\|$\\)"))))
+			     (not (looking-at "=\\([^=]\\|$\\)")))
+			   (or
+			    (not c-opt-block-decls-with-vars-key)
+			    (save-excursion
+			      (c-backward-token-2 1 t nil)
+			      (if (and (looking-at c-symbol-start)
+				       (not (looking-at c-keywords-regexp)))
+				  (c-backward-token-2 1 t nil))
+			      (and
+			       (not (looking-at
+				     c-opt-block-decls-with-vars-key))
+			       (or comma-delim
+				   (not (eq (char-after) ?\,)))))))
 			  (save-excursion
 			    (c-forward-sexp) (point)))
 			 ;; Just gone back over some paren block?
@@ -10987,7 +11003,7 @@
 	    (if (eq (point) (c-point 'boi))
 		(c-add-syntax 'brace-list-intro (point))
 	      (setq lim (c-most-enclosing-brace c-state-cache (point)))
-	      (c-beginning-of-statement-1 lim)
+	      (c-beginning-of-statement-1 lim nil nil t)
 	      (c-add-stmt-syntax 'brace-list-intro nil t lim paren-state)))
 
 	   ;; CASE 9D: this is just a later brace-list-entry or



> Thank you.

> On Sat, Sep 22, 2018, 2:51 PM Alan Mackenzie <acm@HIDDEN> wrote:

> > Hello, Richard.

> > In article <mailman.1141.1537636151.1284.bug-gnu-emacs@HIDDEN> you wrote:

> > > While creating a constructor for my class, I have a multiline
> > > initializer list. For the constructor, the indentation matches that of
> > > the list. Here's an example:

> > > Test::Test(const std::string &a) : a{a}, b{0},
> > >                                    c{"..."}, d{""} {
> > >                 /*notice the indentation*/
> > >          }

[ .... ]

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#32808; Package emacs. Full text available.

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


Received: (at 32808) by debbugs.gnu.org; 22 Sep 2018 20:00:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 22 16:00:13 2018
Received: from localhost ([127.0.0.1]:49908 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1g3o4b-000372-2m
	for submit <at> debbugs.gnu.org; Sat, 22 Sep 2018 16:00:13 -0400
Received: from mail-yb1-f170.google.com ([209.85.219.170]:35677)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <johndoe27328@HIDDEN>) id 1g3o4Z-00035x-Ct
 for 32808 <at> debbugs.gnu.org; Sat, 22 Sep 2018 16:00:12 -0400
Received: by mail-yb1-f170.google.com with SMTP id o63-v6so6835729yba.2
 for <32808 <at> debbugs.gnu.org>; Sat, 22 Sep 2018 13:00:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=kVqgq+s2TLll5cDLzkZUGcH7zciZFXvbX/+xl3E+c80=;
 b=JRIXqMt9Qt3SXXgHYsVTPpb8Hbc2X9xyJ5D1Zp9fdbnQMWx/aJdVN5B5bFat2o8Qa4
 sH2N4RiHXnr8s3Jg5YYMRkgJe9ztDjpwlOSY0fe3lVLlcq0ZSa+JVYDj2EDgo5SBoz5Z
 a3ixrDzd7RWoq/JjWs0nyT1FHycwr9mFOi+vSstvtIKWdyvUI+W2xYZZiwOW77N82NOi
 /Ce/ow3ZXUxUZ2jPLxezJ0xNMWcz58E571Yqxg3oJPUKIUp5o2Pl6KFldTEZ4hj58b1O
 bIlBe9GadstkrZINrATX48ZFKdy27cdBuI6NJKEBAxRV1FBN+1rGlWBqDt9Wga3MOzWH
 hVtg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=kVqgq+s2TLll5cDLzkZUGcH7zciZFXvbX/+xl3E+c80=;
 b=ngPaMPZ3e+7BC3RxCU4JF3jeaIwoFJn4G+K82oQNmApjgl2/Saul/ZSUkpWIQ8lvJH
 uB25eglCnHhmxcwXcIV4g6fuo30OmCiA/bEPrGfV1GEuZfdC5q543l0HM1HQkI18dark
 OvLhWhCe1maaoG0FTOonlLCnew5a+rTndnIsYugU2bORbsfKesqZeSAppY+kl3hQBo2d
 +AzybrFvXx7LoQ+PIkbHYaTZ5qSCA8Oi6t5m4mD98uDPDGOJsd6y9xeH8O3L07O80FzP
 i+IKS+O6gWfUOnhXtA0oiPD03C4nf3C0RqBmz/diMKTm5T/+a2ZTwAe5OnHhom5oYV03
 JQ3Q==
X-Gm-Message-State: ABuFfogGzTEyyh7QdO/DALTWtdldp1+cWf/WBeF9P1n/SUK4SgBSfk9U
 9LJ0ZOr+/CaeDlMniKEkqt4JnjRp7zE3sB/akLYa6g==
X-Google-Smtp-Source: ACcGV63faSWXpdQdCwaiYG0oyhFPEoFka0J4fvkwZcylWKzb/XFqtqdv4U/EHxg1jF8fFmIaMoL+m2Wk715IAKFrIZI=
X-Received: by 2002:a25:b225:: with SMTP id
 i37-v6mr1344974ybj.142.1537646405632; 
 Sat, 22 Sep 2018 13:00:05 -0700 (PDT)
MIME-Version: 1.0
References: <mailman.1141.1537636151.1284.bug-gnu-emacs@HIDDEN>
 <20180922195154.44232.qmail@HIDDEN>
In-Reply-To: <20180922195154.44232.qmail@HIDDEN>
From: Richard Case <johndoe27328@HIDDEN>
Date: Sat, 22 Sep 2018 15:00:02 -0500
Message-ID: <CAG4zyxFtQvxJiqUr3KrYpQXROJpmfbPYSc5_vgP1cduy=Qq78A@HIDDEN>
Subject: Re: bug#32808: 25.2; Indentation after initializer list C++
To: Alan Mackenzie <acm@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000cc497705767b33cf"
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 32808
Cc: 32808 <at> debbugs.gnu.org
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: -0.7 (/)

--000000000000cc497705767b33cf
Content-Type: text/plain; charset="UTF-8"

Hello Alan,

It is the position of the closing brace on the third line.

Thank you.

On Sat, Sep 22, 2018, 2:51 PM Alan Mackenzie <acm@HIDDEN> wrote:

> Hello, Richard.
>
> In article <mailman.1141.1537636151.1284.bug-gnu-emacs@HIDDEN> you wrote:
>
> > While creating a constructor for my class, I have a multiline
> > initializer list. For the constructor, the indentation matches that of
> > the list. Here's an example:
>
> > Test::Test(const std::string &a) : a{a}, b{0},
> >                                    c{"..."}, d{""} {
> >                 /*notice the indentation*/
>           }
>
> Would you please be explicit about what is wrong with the indentation.
> Is it the position of the closing brace on line 3, or the indentation of
> "c{" on line 2, or something else?
>
> Thanks!
>
> [ .... ]
>
> --
> Alan Mackenzie (Nuremberg, Germany).
>
>

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

<div dir=3D"auto">Hello Alan,<div dir=3D"auto"><br></div><div dir=3D"auto">=
It is the position of the closing brace on the third line.=C2=A0</div><div =
dir=3D"auto"><br></div><div dir=3D"auto">Thank you.=C2=A0</div></div><br><d=
iv class=3D"gmail_quote"><div dir=3D"ltr">On Sat, Sep 22, 2018, 2:51 PM Ala=
n Mackenzie &lt;<a href=3D"mailto:acm@HIDDEN">acm@HIDDEN</a>&gt; wrote:<br>=
</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-l=
eft:1px #ccc solid;padding-left:1ex">Hello, Richard.<br>
<br>
In article &lt;<a href=3D"mailto:mailman.1141.1537636151.1284.bug-gnu-emacs=
@gnu.org" target=3D"_blank" rel=3D"noreferrer">mailman.1141.1537636151.1284=
.bug-gnu-emacs@HIDDEN</a>&gt; you wrote:<br>
<br>
&gt; While creating a constructor for my class, I have a multiline<br>
&gt; initializer list. For the constructor, the indentation matches that of=
<br>
&gt; the list. Here&#39;s an example:<br>
<br>
&gt; Test::Test(const std::string &amp;a) : a{a}, b{0},<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 c{&quot;...&quot;},=
 d{&quot;&quot;} {<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/*notice =
the indentation*/=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 }<br>
<br>
Would you please be explicit about what is wrong with the indentation.<br>
Is it the position of the closing brace on line 3, or the indentation of<br=
>
&quot;c{&quot; on line 2, or something else?<br>
<br>
Thanks!<br>
<br>
[ .... ]<br>
<br>
-- <br>
Alan Mackenzie (Nuremberg, Germany).<br>
<br>
</blockquote></div>

--000000000000cc497705767b33cf--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#32808; Package emacs. Full text available.

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


Received: (at 32808) by debbugs.gnu.org; 22 Sep 2018 19:51:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 22 15:51:57 2018
Received: from localhost ([127.0.0.1]:49892 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1g3nwa-0002tE-VW
	for submit <at> debbugs.gnu.org; Sat, 22 Sep 2018 15:51:57 -0400
Received: from colin.muc.de ([193.149.48.1]:21330 helo=mail.muc.de)
 by debbugs.gnu.org with smtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1g3nwZ-0002t6-CJ
 for 32808 <at> debbugs.gnu.org; Sat, 22 Sep 2018 15:51:56 -0400
Received: (qmail 44233 invoked by uid 3782); 22 Sep 2018 19:51:54 -0000
Date: 22 Sep 2018 19:51:54 -0000
Message-ID: <20180922195154.44232.qmail@HIDDEN>
From: Alan Mackenzie <acm@HIDDEN>
To: richard <johndoe27328@HIDDEN>
Subject: Re: bug#32808: 25.2; Indentation after initializer list C++
Organization: muc.de e.V.
In-Reply-To: <mailman.1141.1537636151.1284.bug-gnu-emacs@HIDDEN>
X-Newsgroups: gnu.emacs.bug
User-Agent: tin/2.4.2-20171224 ("Lochhead") (UNIX) (FreeBSD/11.2-RELEASE-p3
 (amd64))
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 32808
Cc: 32808 <at> debbugs.gnu.org
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: -1.0 (-)

Hello, Richard.

In article <mailman.1141.1537636151.1284.bug-gnu-emacs@HIDDEN> you wrote:

> While creating a constructor for my class, I have a multiline
> initializer list. For the constructor, the indentation matches that of
> the list. Here's an example:

> Test::Test(const std::string &a) : a{a}, b{0},
>                                    c{"..."}, d{""} {
>                 /*notice the indentation*/                                        }

Would you please be explicit about what is wrong with the indentation.
Is it the position of the closing brace on line 3, or the indentation of
"c{" on line 2, or something else?

Thanks!

[ .... ]

-- 
Alan Mackenzie (Nuremberg, Germany).





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#32808; Package emacs. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 22 Sep 2018 17:08:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 22 13:08:25 2018
Received: from localhost ([127.0.0.1]:49818 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1g3lOK-0007PL-ON
	for submit <at> debbugs.gnu.org; Sat, 22 Sep 2018 13:08:25 -0400
Received: from eggs.gnu.org ([208.118.235.92]:59675)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <johndoe27328@HIDDEN>) id 1g3lJi-0007I7-Cy
 for submit <at> debbugs.gnu.org; Sat, 22 Sep 2018 13:03:38 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <johndoe27328@HIDDEN>) id 1g3lJc-0005IL-3e
 for submit <at> debbugs.gnu.org; Sat, 22 Sep 2018 13:03:33 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: *
X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50,
 FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,T_DKIM_INVALID autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:46136)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <johndoe27328@HIDDEN>)
 id 1g3lJb-0005Ho-UG
 for submit <at> debbugs.gnu.org; Sat, 22 Sep 2018 13:03:32 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:52322)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <johndoe27328@HIDDEN>) id 1g3lJX-0001c0-PC
 for bug-gnu-emacs@HIDDEN; Sat, 22 Sep 2018 13:03:31 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <johndoe27328@HIDDEN>) id 1g3lB6-00070p-0R
 for bug-gnu-emacs@HIDDEN; Sat, 22 Sep 2018 12:54:48 -0400
Received: from mail-it1-x133.google.com ([2607:f8b0:4864:20::133]:39164)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <johndoe27328@HIDDEN>)
 id 1g3lB5-00070Y-Q2
 for bug-gnu-emacs@HIDDEN; Sat, 22 Sep 2018 12:54:43 -0400
Received: by mail-it1-x133.google.com with SMTP id h1-v6so5717657itj.4
 for <bug-gnu-emacs@HIDDEN>; Sat, 22 Sep 2018 09:54:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:subject:date:message-id:mime-version;
 bh=fz3J/LtVJpUUv6Y+Ih8/MYaLDuRDciuYiuTpc/hk2HI=;
 b=nMn7tpofQ0aUAJAcO3YaV2WE6DjVoS2dSVL6+HyCoxAzz1jZ8VBuibrRI5Tbn/nzAG
 0Krrc/GjncKRxfMIor4g9thoJVGf/Bq0Y/ch8KICAsa8ElnZufUtix1IkJzsnJt5ZPNd
 6e6HIWyLVRTnmCHbzx0rmQAfRytGtGJJm+m7wYqxPVa9efR7zWfA64BF4bspL9jCiABA
 oks/RpOc8L7Bo9FtTSmBPIjQvKnRD9b3VUe0ZOwgv7FRTfcufNRaZKVW7AEYw5WXUsJ5
 U+seCJXzlsldzXLlsxGRpAGBvejlVAl9v3J6A41QCJ6qY8gxrnkpdWhb6KfdgWms76S0
 5X2g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version;
 bh=fz3J/LtVJpUUv6Y+Ih8/MYaLDuRDciuYiuTpc/hk2HI=;
 b=cRbxDdgzyj5EOALoUXjkcVixcWhlBbCLVeuWkWpImvU9wyh4XjXPSb+qqFbLxGKCwT
 FetG5LU8LOSj6Ko1YNFrY68D0cNtUdbv4oFHOFVJBUKUH+/FFIHSkbT8BGbh5WOfJdFA
 LuIPk7kbbViJM8YGVG+MnubOOgDLXlopQplTjAZrVrfrd1IlRc89iKICaX21UrIz3A8/
 NdbOJDMDxX7Iui7bJKvIJPqkKKMlsYDMlMIUXKnEz0ph/Cihv6QNeTIKSk1p/4B0BENK
 xMMQ/jnLvJM9mmfLsSuVRe1oKMXX+amWQ5g5AAOm/pnQg3CHrUp6yKCMnua78AzVzBhn
 rbyg==
X-Gm-Message-State: ABuFfohCU3W5M7gYaMsduU+k/3qABy2FRV6hoGMS4N0cHWQQHkbrfnUi
 FqjWmh9OIqOrPfL7IsY9a5KFW278/5Q=
X-Google-Smtp-Source: ANB0VdbEvD7SSEvtwOuYVLDPC+JXYrEY7A2m16R0FxB49+KMfe6YbXROJDISH6I9i2Tc3ws75LjQjg==
X-Received: by 2002:a24:400b:: with SMTP id n11-v6mr2289647ita.2.1537635282446; 
 Sat, 22 Sep 2018 09:54:42 -0700 (PDT)
Received: from ubundoo (047-012-023-132.res.spectrum.com. [47.12.23.132])
 by smtp.gmail.com with ESMTPSA id n140-v6sm5559623itb.37.2018.09.22.09.54.40
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Sat, 22 Sep 2018 09:54:41 -0700 (PDT)
From: richard <johndoe27328@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 25.2; Indentation after initializer list C++
Date: Sat, 22 Sep 2018 11:54:19 -0500
Message-ID: <87efdl5v7o.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
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: -3.8 (---)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Sat, 22 Sep 2018 13:08:24 -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.8 (----)


While creating a constructor for my class, I have a multiline
initializer list. For the constructor, the indentation matches that of
the list. Here's an example:

Test::Test(const std::string &a) : a{a}, b{0},
			           c{"..."}, d{""} {
		/*notice the indentation*/					  }




In GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.21)
 of 2017-09-22, modified by Debian built on lgw01-amd64-050
Windowing system distributor 'The X.Org Foundation', version 11.0.11905000
System Description:	Ubuntu 17.10

Configured using:
 'configure --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/emacs25:/etc/emacs:/usr/local/share/emacs/25.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.2/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --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/emacs25:/etc/emacs:/usr/local/share/emacs/25.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.2/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-x=yes --with-x-toolkit=gtk3
 --with-toolkit-scroll-bars 'CFLAGS=-g -O2
 -fdebug-prefix-map=/build/emacs25-jYekUr/emacs25-25.2+1=. -fstack-protector-strong
 -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
 -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: C++/l

Minor modes in effect:
  diff-auto-refine-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-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 messages:
Loading /usr/share/emacs25/site-lisp/haskell-mode/haskell-mode-autoloads.el (source)...done
Loading /etc/emacs/site-start.d/50haskell-mode.el (source)...done
Loading /etc/emacs/site-start.d/50irony-mode.el (source)...done
Loading /etc/emacs/site-start.d/50php-elisp.el (source)...done
Loading /etc/emacs/site-start.d/60agda-stdlib.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.
funcall-interactively: Beginning of buffer
Mark set [4 times]
Auto-saving...done
Making completion list...

Load-path shadows:
/usr/share/emacs25/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode
/usr/share/emacs/25.2/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup

Features:
(shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec password-cache epg gnus-util mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils vc-git
diff-mode easy-mmode cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs wheatgrass-theme finder-inf
go-mode-autoloads package epg-config seq byte-opt gv bytecomp
byte-compile cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib
haskell-mode-autoloads devhelp time-date mule-util tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
dbusbind inotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 122586 4894)
 (symbols 48 23758 0)
 (miscs 40 66 229)
 (strings 32 25836 5164)
 (string-bytes 1 875386)
 (vectors 16 16999)
 (vector-slots 8 490112 3548)
 (floats 8 203 48)
 (intervals 56 663 23)
 (buffers 976 19))




Acknowledgement sent to richard <johndoe27328@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#32808; 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: Fri, 7 Dec 2018 18:00:02 UTC

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