Graham Percival <graham <at> 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:

 # add space before (, except in macro definitions
 sed -i -e '/#\s*define/!s/\([)_[:alnum:]]\)(/\1 (/g' $*

 astyle --style=gnu --indent-cases --indent=spaces=2 \
  --max-instatement-indent=60 \
  --align-pointer=name --pad-oper \
  --keep-one-line-blocks --quiet  $*
 # no need for --pad-paren-out

This passes a `make check` but it needs a facility to skip over comments and 
strings (such as the facility already written for fixcc).





_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to