[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074)
From: |
k-ohara5a5a |
Subject: |
Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074) |
Date: |
Tue, 05 Jul 2011 08:00:59 +0000 |
On 7/4/11 11:32 PM, "Jan Nieuwenhuizen" <janneke <at> 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 make it as easy as possible for non-Emacs
users; but choosing a coding style that Emacs does not support is
a no-go.
Well, the good news is
+ Most of the problems we had were due to the prefilter, not emacs
+ emacs onlyd does the indentation, so probably we need not worry about
which emacs version
+ emacs can indent spaces instead of tabs
+ The prefilter can protect block comments from emacs indentation
Therefore here is a new patch set showing a restricted pre-filter using
emacs. I have only had a quick look at the diffs but what I saw looked
good. Runnign the formatter on the full tree gives a clean make; I have
a busy Tuesday, but at the end of it I can run make check and report
back here.
Since the operation is emacs( prefilter (code)), then further editing
using emacs will make no changes -- assuming emacs indentation is
idempotent, which is my big word for the day.
http://codereview.appspot.com/4662074/diff/4031/scripts/auxiliar/fixcc.py
File scripts/auxiliar/fixcc.py (right):
http://codereview.appspot.com/4662074/diff/4031/scripts/auxiliar/fixcc.py#newcode64
scripts/auxiliar/fixcc.py:64: # trailing operator, but don't un-trail
assignment operators or close angle-braces >
On 2011/07/04 20:45:23, Keith wrote:
Looking through the existing code, line-broken assignments /do/ get
the '=' on
the second line
long_name
= long_initializer;
so I could restore that.
Done.
http://codereview.appspot.com/4662074/
- Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074), (continued)
Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074), k-ohara5a5a, 2011/07/04
- Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074), Jan Nieuwenhuizen, 2011/07/05
- Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074), Carl Sorensen, 2011/07/05
- Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074), Jan Nieuwenhuizen, 2011/07/05
- Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074), Trevor Daniels, 2011/07/05
- Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074), Keith OHara, 2011/07/06
- Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074), Carl Sorensen, 2011/07/06
- Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074), Trevor Daniels, 2011/07/06
Re: Adapt fixcc.py to use Astyle instead of emacs (issue4662074),
k-ohara5a5a <=