Il giorno dom, 19/08/2012 alle 16.02 +0000, gra...@percival-music.ca ha scritto: > Could you add a script (either shell or python) which applies this > formatting to all scheme files in the repository? I'd like to see how > that changes the scheme files.
You can try running (after having applied David's patch) emacs -batch scm/*.scm --eval '(progn (delete-trailing-whitespace) (indent-region (point-min) (point-max) nil) (save-buffer))' On my system this has only changed x11-color.scm. Note that this doesn't remove tabs (although I installed David's patch that adds .dir-locals.el), as you can notice with git add scm emacs -batch *.scm --eval '(progn (delete-trailing-whitespace) (indent-region (point-min) (point-max) nil) (untabify (point-min) (point-max)) (save-buffer))' git diff which further changes x11-color.scm. I attached the result of git diff HEAD scm If you're fine with the above emacs call (the one with untabify of course) going in scripts/auxiliar/fixscm.sh, I'll submit a new patch to take over this issue. Best, John
diff --git a/scm/x11-color.scm b/scm/x11-color.scm index 5be7657..f3d65b9 100644 --- a/scm/x11-color.scm +++ b/scm/x11-color.scm @@ -15,7 +15,7 @@ ;;;; You should have received a copy of the GNU General Public License ;;;; along with LilyPond. If not, see <http://www.gnu.org/licenses/>. -(define x11-color-list +(define x11-color-list '((snow 1 0.98039215686274506 0.98039215686274506) (GhostWhite 0.97254901960784312 0.97254901960784312 1) (WhiteSmoke 0.96078431372549022 0.96078431372549022 0.96078431372549022) @@ -677,32 +677,32 @@ (define (make-x11-color-handler) (let ((x11-color-table (make-hash-table 31))) - + (lambda (arg) - (let* - ((arg-sym (if (string? arg) - (if (string-index arg #\ ) - (let - ((arg-list (string-split (string-capitalize arg) #\ ))) + (let* + ((arg-sym (if (string? arg) + (if (string-index arg #\ ) + (let + ((arg-list (string-split (string-capitalize arg) #\ ))) + + (string->symbol + (let append-all ((x arg-list)) + (if (null? x) + "" + (string-append (car x) (append-all (cdr x))))))) + + (string->symbol arg)) + arg)) + + (temp (hashq-ref x11-color-table arg-sym))) + + (if temp + temp + (let* + ((temp-1 (assq-ref x11-color-list arg-sym)) + (temp (if temp-1 temp-1 '(0 0 0)))) - (string->symbol - (let append-all ((x arg-list)) - (if (null? x) - "" - (string-append (car x) (append-all (cdr x))))))) - - (string->symbol arg)) - arg)) - - (temp (hashq-ref x11-color-table arg-sym))) - - (if temp - temp - (let* - ((temp-1 (assq-ref x11-color-list arg-sym)) - (temp (if temp-1 temp-1 '(0 0 0)))) - - (hashq-create-handle! x11-color-table arg-sym temp) - temp)))))) + (hashq-create-handle! x11-color-table arg-sym temp) + temp)))))) (define-public x11-color (make-x11-color-handler))
_______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel