Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-06 Thread Trevor Daniels
Carl Sorensen wrote Wednesday, July 06, 2011 11:02 PM If emacs *can* do it the way we want it, and astyle *will* do it the way we want it, then I think we ought to just go ahead with astyle, and not worry if an emacs-style reindent gets through occasionally. After all, we can fix it with fi

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-06 Thread Carl Sorensen
On 7/6/11 1:43 PM, "Keith OHara" wrote: > On Tue, 05 Jul 2011 00:18:21 -0700, Trevor Daniels > wrote: > >> Carl Sorensen wrote Tuesday, July 05, 2011 7:12 AM >> >>> >>> long_variable_name = (first_term >>> + second_term); >> >> I prefer this indentation too. If Emac

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-06 Thread Keith OHara
On Tue, 05 Jul 2011 00:18:21 -0700, Trevor Daniels wrote: Carl Sorensen wrote Tuesday, July 05, 2011 7:12 AM long_variable_name = (first_term + second_term); I prefer this indentation too. If Emacs users forget the brackets Astyle will indent it, but without the bra

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-05 Thread k-ohara5a5a
On 7/4/11 11:32 PM, "Jan Nieuwenhuizen" gnu.org> wrote: Also, I tried to make the output of the modified fixcc+asytle pass unchanged through emacs, but the very many cases of line-broken asssignments will be different. Emacs users will forget to run fixcc That won't do, sorry. Let's mak

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-05 Thread Trevor Daniels
Carl Sorensen wrote Tuesday, July 05, 2011 7:12 AM On 7/4/11 11:32 PM, "Jan Nieuwenhuizen" wrote: Also, I tried to make the output of the modified fixcc+asytle pass unchanged through emacs, but the very many cases of line-broken asssignments will be different. That's a problem. lo

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-04 Thread Jan Nieuwenhuizen
Carl Sorensen writes: > If we want to change the indentation, can't we do it with > > long_variable_name = (first_term >+ second_term); > > and have Emacs indent it this way? We could; python requires this anyway. I still prefer option 3 below: have astyle support 2 space

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-04 Thread Carl Sorensen
On 7/4/11 11:32 PM, "Jan Nieuwenhuizen" wrote: > > >> Also, I tried to make the output of the modified fixcc+asytle pass >> unchanged through emacs, but the very many cases of line-broken >> asssignments will be different. > > That's a problem. > >> long_variable_name = first_term >> +

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-04 Thread Jan Nieuwenhuizen
Graham Percival writes: > Ok, so you do not object us adopting fixcc-with-astyle as the > official formatter for C++ code? It seems that this is a huge step forward; just don't change the definition to `whatever astyle can currently handle'; rather than: fixcc is okay and we're working with the a

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-04 Thread Jan Nieuwenhuizen
> Also, I tried to make the output of the modified fixcc+asytle pass > unchanged through emacs, but the very many cases of line-broken > asssignments will be different. That's a problem. > long_variable_name = first_term > + second_term; // emacs This is correct. > Emacs users will forge

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-04 Thread Graham Percival
On Mon, Jul 04, 2011 at 09:58:14PM +0200, Jan Nieuwenhuizen wrote: > Carl Sorensen writes: > > > I've tried Emacs, and I can't see the benefits justifying fighting through > > the learning curve. It's not comfortable for me; I have 30+ years of > > experience with vi(m), so it's hardwired in my b

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-04 Thread k-ohara5a5a
On 2011/07/04 09:28:26, janneke_gnu.org wrote: The GNU standards are implemented by Emacs, Well, it looks like the problems with fixcc.py were caused by regexps, not emacs. Also, I tried to make the output of the modified fixcc+asytle pass unchanged through emacs, but the very many cases of l

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-04 Thread Jan Nieuwenhuizen
Carl Sorensen writes: > I've tried Emacs, and I can't see the benefits justifying fighting through > the learning curve. It's not comfortable for me; I have 30+ years of > experience with vi(m), so it's hardwired in my bones. Something went wrong here; it's awesome if we can manage not to depend

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-04 Thread Keith OHara
On Mon, 04 Jul 2011 09:32:21 -0700, Trevor Daniels wrote: Jan Nieuwenhuizen wrote Monday, July 04, 2011 10:28 AM It seems to me that someone is spending a lot of effort `just' to accommodate people who haven't found how awesome Emacs is to edit code and thus introduce layout problems. Sure

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-04 Thread Carl Sorensen
On 7/4/11 3:28 AM, "Jan Nieuwenhuizen" wrote: > Trevor Daniels writes: > >> I agree. This is a big improvement, and would >> give us control over the layout style ourselves >> (rather than "what emacs does"). > > While the work being done here is possibly a good thing, let me remind > you once

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-04 Thread Trevor Daniels
Jan Nieuwenhuizen wrote Monday, July 04, 2011 10:28 AM Trevor Daniels writes: I agree. This is a big improvement, and would give us control over the layout style ourselves (rather than "what emacs does"). While the work being done here is possibly a good thing, let me remind you once mor

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-04 Thread Reinhold Kainhofer
Am Montag 04 Juli 2011, 11:28:19 schrieb Jan Nieuwenhuizen: > The GNU standards are implemented by Emacs, and if it makes an error, > then that's a serious bug that should be reported (to emacs). It seems > to me that someone is spending a lot of effort `just' to accomodate > people who haven't fo

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-04 Thread Graham Percival
On Mon, Jul 04, 2011 at 11:28:19AM +0200, Jan Nieuwenhuizen wrote: > While the work being done here is possibly a good thing, let me remind > you once more that we are a GNU project and thus use the GNU standards > and thus we need no control over, we need not decide about, we need not > discuss la

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-04 Thread Jan Nieuwenhuizen
Trevor Daniels writes: > I agree. This is a big improvement, and would > give us control over the layout style ourselves > (rather than "what emacs does"). While the work being done here is possibly a good thing, let me remind you once more that we are a GNU project and thus use the GNU standard

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-04 Thread Trevor Daniels
wrote Monday, July 04, 2011 4:33 AM I really, really, wish Astyle had a fully gnu-compliant mode out of the box. I went through the regexp's again and think this is good to go. I agree. This is a big improvement, and would give us control over the layout style ourselves (rather than "what

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-03 Thread k-ohara5a5a
I really, really, wish Astyle had a fully gnu-compliant mode out of the box. I went through the regexp's again and think this is good to go. I'll push a commit showing this run over the whole repository to

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-03 Thread Graham Percival
On Sun, Jul 03, 2011 at 02:51:47PM +0100, Neil Puttock wrote: > > I'm surprised astyle gets this wrong! > > On a slight tangent: we might want a coding policy decision for init > lists (I understand they're more efficient). So far, only Jan has > changed any files to use them (with the recent mid

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-03 Thread Keith OHara
On Sun, 03 Jul 2011 05:18:32 -0700, Carl Sorensen wrote: if (Score *newscore = unsmob_score (entry)) -*t = scm_cons (newscore->clone ()->unprotect (), SCM_EOL); +* t = scm_cons (newscore->clone ()->unprotect (), SCM_EOL); else if (Page_marker *marker = unsmob_page_

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-03 Thread Neil Puttock
On 3 July 2011 14:39, Graham Percival wrote: > On Sun, Jul 03, 2011 at 02:25:12PM +0100, Neil Puttock wrote: >>    Matrix (vsize rows, vsize columns, T const &t) >> -  : data_(rows * columns, t) >> +    : data_ (rows *columns, t) >> >> misinterpreted multiplication sign > > heh, that one's funny!

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-03 Thread Graham Percival
On Sun, Jul 03, 2011 at 02:25:12PM +0100, Neil Puttock wrote: >Matrix (vsize rows, vsize columns, T const &t) > - : data_(rows * columns, t) > +: data_ (rows *columns, t) > > misinterpreted multiplication sign heh, that one's funny! > --- a/flower/include/rational.hh > +++ b/flower/incl

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-03 Thread Neil Puttock
On 3 July 2011 12:49, Graham Percival wrote: > I've spent a few minutes skimming through it without finding > anything disagreeable. A few fishy looking changes: int lily_cookie_fprintf (void *file, char const *format, ...) -__attribute__ ((format (printf, 2, 3))); + __attribute__ ((for

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-03 Thread Neil Puttock
On 3 July 2011 13:18, Carl Sorensen wrote: > On 7/3/11 5:49 AM, "Graham Percival" wrote: > >> On Sun, Jul 03, 2011 at 01:43:40AM -0700, Keith OHara wrote: >>> On Sat, 02 Jul 2011 19:41:15 -0700, wrote: >>> Can you make it possible for us to see the diff caused by applying this script t

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-03 Thread Carl Sorensen
On 7/3/11 5:49 AM, "Graham Percival" wrote: > On Sun, Jul 03, 2011 at 01:43:40AM -0700, Keith OHara wrote: >> On Sat, 02 Jul 2011 19:41:15 -0700, wrote: >> >>> Can you make it possible for us to see the diff caused by applying this >>> script to the files you've mentioned? >>> >> >> I will so

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-03 Thread Graham Percival
On Sun, Jul 03, 2011 at 01:43:40AM -0700, Keith OHara wrote: > On Sun, 03 Jul 2011 01:15:04 -0700, wrote: > > >Astyle preserved the alignment, relative to the /*, in the original. > > That is to say, I think you were comparing against the output of > fixcc.py+emacs > Emacs re-formats the commen

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-03 Thread Keith OHara
On Sun, 03 Jul 2011 01:15:04 -0700, wrote: On 2011/07/03 07:22:07, Graham Percival wrote: 2. some multi-line comments are still modified: Astyle preserved the alignment, relative to the /*, in the original. That is to say, I think you were comparing against the output of fixcc.py+emacs Em

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-03 Thread k-ohara5a5a
On 2011/07/03 07:22:07, Graham Percival wrote: 1. all // comments are now hard-left (i.e. in column 0). This is fixed in the new patch set. The pre-filter was collapsing all whitespace, bringing single-line comments to the left edge, and astyle is conservative about re-indenting these, unless w

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-03 Thread percival . music . ca
On 2011/07/03 02:41:15, Carl wrote: Can you make it possible for us to see the diff caused by applying this script to the files you've mentioned? I'll make a separate git branch showing the output once a few minor issues are done. Keith: 1. all // comments are now hard-left (i.e. in column

Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-02 Thread Carl . D . Sorensen
Can you make it possible for us to see the diff caused by applying this script to the files you've mentioned? Thanks, Carl http://codereview.appspot.com/4662074/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/li

Adapt fixcc.py to use Astyle instead of emacs (issue4662074)

2011-07-02 Thread k-ohara5a5a
Reviewers: , Message: This script, applied to the .cc .icc and .hh files in flower/ and lily/, gives a clean make check. http://codereview.appspot.com/4662074/diff/7001/scripts/auxiliar/fixcc.py File scripts/auxiliar/fixcc.py (right): http://codereview.appspot.com/4662074/diff/7001/scripts/aux