Re: GOP-PROP 3: C++ formatting (update)

2011-07-02 Thread Jan WarchoĊ‚
2011/7/3 Graham Percival : > On Sat, Jul 02, 2011 at 03:13:05PM -0700, Keith OHara wrote: >> On Sat, 02 Jul 2011 13:19:23 -0700, Graham Percival >> wrote: >> >> >[...] but I'd still want to run fixcc.py on the entire repo. >> >> Why run an indenter over the entire repository? >> Simply having the

Re: GOP-PROP 3: C++ formatting (update)

2011-07-02 Thread Keith OHara
On Sat, 02 Jul 2011 15:57:38 -0700, Graham Percival wrote: On Sat, Jul 02, 2011 at 03:13:05PM -0700, Keith OHara wrote: > Why run an indenter over the entire repository? 1. newbies tend to trust that the existing material shows how they should do things. 2. if we indent files in conjunction w

Re: GOP-PROP 3: C++ formatting (update)

2011-07-02 Thread Graham Percival
On Sat, Jul 02, 2011 at 03:13:05PM -0700, Keith OHara wrote: > On Sat, 02 Jul 2011 13:19:23 -0700, Graham Percival > wrote: > > >[...] but I'd still want to run fixcc.py on the entire repo. > > Why run an indenter over the entire repository? > Simply having the indenter tool available for indiv

Re: GOP-PROP 3: C++ formatting (update)

2011-07-02 Thread Keith OHara
On Sat, 02 Jul 2011 13:19:23 -0700, Graham Percival wrote: On Thu, Jun 30, 2011 at 12:04:11AM -0700, Keith OHara wrote: We could use a regexp pre-filter to add space where gnu-style wants it, and use that as a model to support the request for a new option in astyle. Ok, but we'd still nee

Re: GOP-PROP 3: C++ formatting (update)

2011-07-02 Thread Graham Percival
On Thu, Jun 30, 2011 at 12:04:11AM -0700, Keith OHara wrote: > On Wed, 29 Jun 2011 21:05:51 -0700, Carl Sorensen wrote: > > >Do you have the ability to easily test a change that doesn't pad a > >parenthesis if it's following the same character, ie. (( won't get an extra > >space? > > It turns ou

Re: GOP-PROP 3: C++ formatting (update)

2011-07-02 Thread Graham Percival
On Wed, Jun 29, 2011 at 11:53:34PM +, Keith OHara wrote: > Pre-filtering works well, assuming we drop the corresponding astyle options: > > # add space before (, except in macro definitions > sed -i -e '/#\s*define/!s/\([)_[:alnum:]]\)(/\1 (/g' $* Hmm. This line gives me control characters

Re: GOP-PROP 3: C++ formatting (update)

2011-06-30 Thread Keith OHara
On Wed, 29 Jun 2011 21:05:51 -0700, Carl Sorensen wrote: Do you have the ability to easily test a change that doesn't pad a parenthesis if it's following the same character, ie. (( won't get an extra space? It turns out to be very easy to modify astyle so as to skip the padding between (( an

Re: GOP-PROP 3: C++ formatting (update)

2011-06-29 Thread Keith OHara
On Wed, 29 Jun 2011 21:05:51 -0700, Carl Sorensen wrote: On 6/29/11 6:01 PM, "Keith OHara" wrote: Graham Percival percival-music.ca> writes: At the moment I'm leaning towards using astyle+postprocessing. padding that can be helpful - && ((d == LEFT && !line_->get_bound (LEFT)) -

Re: GOP-PROP 3: C++ formatting (update)

2011-06-29 Thread Carl Sorensen
On 6/29/11 6:01 PM, "Keith OHara" wrote: > Graham Percival percival-music.ca> writes: > >> At the moment I'm leaning towards using astyle+postprocessing. >> > > By coincidence, I just finished looking over astyle alone. > > The options you first proposed aren't enough for me, because I can't

Re: GOP-PROP 3: C++ formatting (update)

2011-06-29 Thread Keith OHara
Graham Percival percival-music.ca> writes: > At the moment I'm leaning towards using astyle+postprocessing. > By coincidence, I just finished looking over astyle alone. The options you first proposed aren't enough for me, because I can't remember how to gnu-space things like me->origin ()

Re: GOP-PROP 3: C++ formatting (update)

2011-06-29 Thread Keith OHara
Graham Percival percival-music.ca> writes: > > At the moment I'm leaning towards using astyle+postprocessing. > The script in question is here: Don't post-process, or you mis-align the indentation that astyle did. Pre-filtering works well, assuming we drop the corresponding astyle options: #

GOP-PROP 3: C++ formatting (update)

2011-06-29 Thread Graham Percival
This is an update, rather than a "probable decision". I don't think we're close enough to have a real proposal. http://lilypond.org/~graham/gop/gop_3.html At the moment I'm leaning towards using astyle+postprocessing. The script in question is here: http://git.savannah.gnu.org/gitweb/?p=lilypond