X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fbackend-library.scm;h=0734a1a83427339603fd641ff19488ccac5073b0;hb=d8d7985d6027b374744a7c88250b856c4ef7e619;hp=f21decd96b6d2ee3690a4bf165ae36a2b22f6a2b;hpb=11d5b22d4eb69696b43e576db3d16793dd166d93;p=lilypond.git diff --git a/scm/backend-library.scm b/scm/backend-library.scm index f21decd96b..0734a1a834 100644 --- a/scm/backend-library.scm +++ b/scm/backend-library.scm @@ -1,6 +1,6 @@ ;;;; This file is part of LilyPond, the GNU music typesetter. ;;;; -;;;; Copyright (C) 2005--2011 Jan Nieuwenhuizen +;;;; Copyright (C) 2005--2012 Jan Nieuwenhuizen ;;;; Han-Wen Nienhuys ;;;; ;;;; LilyPond is free software: you can redistribute it and/or modify @@ -24,20 +24,16 @@ (ice-9 optargs)) (define-public (ly:system command) - (if (ly:get-option 'verbose) - (begin - (ly:message (_ "Invoking `~a'...") (string-join command))) - (ly:progress "\n")) + (ly:debug (_ "Invoking `~a'...") (string-join command)) (let ((status (apply ly:spawn command))) (if (> status 0) (begin - (ly:message (_ "`~a' failed (~a)") command status) - (ly:progress "\n") + (ly:warning (_ "`~a' failed (~a)\n") command status) ;; hmmm. what's the best failure option? (throw 'ly-file-failed))))) (define-public (sanitize-command-option str) - "Kill dubious shell quoting" + "Kill dubious shell quoting." (string-append "\"" @@ -91,8 +87,7 @@ "-c.setpdfwrite" (string-append "-f" name))))) - (ly:message (_ "Converting to `~a'...") pdf-name) - (ly:progress "\n") + (ly:message (_ "Converting to `~a'...\n") pdf-name) (ly:system cmd))) (define-public (postscript->png resolution paper-width paper-height name) @@ -117,7 +112,7 @@ (base (dir-basename filename ".ps" ".eps")) (intermediate (remove (lambda (x) (member x formats)) completed))) (for-each (lambda (f) - ((eval (string->symbol (format "convert-to-~a" f)) + ((eval (string->symbol (format #f "convert-to-~a" f)) module) paper-book filename)) completed) (if (ly:get-option 'delete-intermediate-files) (for-each (lambda (f) @@ -212,7 +207,8 @@ (filter (lambda (x) (not (pred? x))) lst)) (define-public (font-name-split font-name) - "Return (FONT-NAME . DESIGN-SIZE) from FONT-NAME string or #f." + "Return @code{(FONT-NAME . DESIGN-SIZE)} from @var{font-name} string +or @code{#f}." (let ((match (regexp-exec (make-regexp "(.*)-([0-9]*)") font-name))) (if (regexp-match? match) (cons (match:substring match 1) (match:substring match 2)) @@ -221,13 +217,13 @@ ;; Example of a pango-physical-font ;; ("Emmentaler-11" "/home/janneke/vc/lilypond/out/share/lilypond/current/fonts/otf/emmentaler-11.otf" 0) (define-public (pango-pf-font-name pango-pf) - "Return the font-name of the pango physical font PANGO-PF." + "Return the font-name of the pango physical font @var{pango-pf}." (list-ref pango-pf 0)) (define-public (pango-pf-file-name pango-pf) - "Return the file-name of the pango physical font PANGO-PF." + "Return the file-name of the pango physical font @var{pango-pf}." (list-ref pango-pf 1)) (define-public (pango-pf-fontindex pango-pf) - "Return the fontindex of the pango physical font PANGO-PF." + "Return the fontindex of the pango physical font @var{pango-pf}." (list-ref pango-pf 2)) (define (pango-font-name pango-font) @@ -237,8 +233,9 @@ ""))) (define-public (define-fonts paper define-font define-pango-pf) - "Return a string of all fonts used in PAPER, invoking the functions -DEFINE-FONT DEFINE-PANGO-PF for producing the actual font definition." + "Return a string of all fonts used in @var{paper}, invoking the functions +@var{define-font} and @var{define-pango-pf} for producing the actual font +definition." (let* ((font-list (ly:paper-fonts paper)) (pango-fonts (filter ly:pango-font? font-list))