diff options
author | Ludovic Courtès | 2012-05-14 23:55:14 +0200 |
---|---|---|
committer | Ludovic Courtès | 2012-05-14 23:55:14 +0200 |
commit | c1d408da1cb454d3846a38e5f8ecc89d56c7b698 (patch) | |
tree | 111b042bb4cd76316290db1ca16a3728d028aaa6 /src/guile | |
parent | 196a4f8ac0f12d9193d14d9d9fa9ced8f9420b9c (diff) | |
download | skribilo-c1d408da1cb454d3846a38e5f8ecc89d56c7b698.tar.gz skribilo-c1d408da1cb454d3846a38e5f8ecc89d56c7b698.tar.lz skribilo-c1d408da1cb454d3846a38e5f8ecc89d56c7b698.zip |
lout: Avoid passing non-literal strings to `format'.
* src/guile/skribilo/engine/lout.scm (lout-debug): `string-append' to
FMT at compile-time.
Use `display' instead of `format' when literal strings are passed.
Diffstat (limited to 'src/guile')
-rw-r--r-- | src/guile/skribilo/engine/lout.scm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/guile/skribilo/engine/lout.scm b/src/guile/skribilo/engine/lout.scm index 7ce8efa..2c7dac5 100644 --- a/src/guile/skribilo/engine/lout.scm +++ b/src/guile/skribilo/engine/lout.scm @@ -378,8 +378,9 @@ (define *lout-debug?* #f) (define-macro (lout-debug fmt . args) - `(and *lout-debug?* - (format (current-error-port) (string-append ,fmt "~%") ,@args))) + (let ((fmt (string-append fmt "~%"))) + `(and *lout-debug?* + (format (current-error-port) ,fmt ,@args)))) (define (lout-tagify ident) ;; Return an "clean" identifier (a string) based on `ident' (a string), @@ -1722,8 +1723,8 @@ ;; linebreak. However, the LaTeX engine doesn't seem to ;; agree. ;(display "\n@LP") - (format #t (string-append "\n@Tbl # frame\n" - " rule { yes }\n")) + (display (string-append "\n@Tbl # frame\n" + " rule { yes }\n")) (if border (format #t " rulewidth { ~a }\n" (lout-width border))) (if width (format #t " width { ~a }\n" @@ -2557,7 +2558,7 @@ (if (and (eq? kind 'mark) ident show-page-num?) ;; Marks don't have a number. - (format #t (lout-page-of ident)) + (display (lout-page-of ident)) ;; Don't output a section/whatever number when text is ;; provided in order to be consistent with the HTML @@ -2571,7 +2572,7 @@ (display " ") (display number)) (if (and ident show-page-num?) - (format #t (lout-page-of ident))))))))) + (display (lout-page-of ident))))))))) ;*---------------------------------------------------------------------*/ ;* lout-make-url-breakable ... */ |