<div dir="ltr">Submitted as r214857, thank you!</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 9, 2014 at 2:20 PM, Jarkko Hietaniemi <span dir="ltr"><<a href="mailto:jhi@iki.fi" target="_blank">jhi@iki.fi</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I wanted cuddled braces for 'if' and 'else' (just like the default style gives) *except* that I wanted my 'else' keywords themselves "uncuddled", that is, inserting a break before the 'else':<br>

<br>
if (a) {<br>
  a();<br>
}<br>
else {<br>
  b();<br>
}<br>
<br>
This style makes the 'else' stand out better, instead of being hidden in<br>
<br>
  } else {<br>
<br>
while still giving the relatively tighter vertical packing of lines.<br>
<br>
This looks to be part of the "Stroustrup" style.<br>
<br>
However, I'm a little dubious about changing this because so far it hasn't been part of the Stroustrup behavior... that is, existing users of BS_Stroustrup will have their code look different when they re-format.<br>

<br>
But <a href="http://www.stroustrup.com/Programming/PPP-style-rev3.pdf" target="_blank">http://www.stroustrup.com/<u></u>Programming/PPP-style-rev3.pdf</a> very clearly "uncuddles" the 'else', while the braces of both 'else' and 'if' are "cuddled", as a proper K&R descendant should.<br>

<br>
In case changing the behavior of BS_Stroustrup is deemed too big a change, I'm also including an alternate version of the change which adds a new top-level option for this, AlwaysBreakBeforeElse.<br>
<br>
Patches attached.<br>
<br>
<br>
<br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>