diff options
author | Ludovic Courtès | 2010-03-08 00:27:57 +0100 |
---|---|---|
committer | Ludovic Courtès | 2010-03-08 00:27:57 +0100 |
commit | 86de6d9453a9d747bddadd20fce67e58c4dbe8c7 (patch) | |
tree | 44ad52bc21763d13adf5de74d3c50ab92a75fae4 /doc/user/syntax.skb | |
parent | cb2c1a2e6bef653cf9b7aa003d8fcfe09fc4eca0 (diff) | |
download | skribilo-86de6d9453a9d747bddadd20fce67e58c4dbe8c7.tar.gz skribilo-86de6d9453a9d747bddadd20fce67e58c4dbe8c7.tar.lz skribilo-86de6d9453a9d747bddadd20fce67e58c4dbe8c7.zip |
Factorize encoding twiddling in `set-correct-file-encoding!'.
* doc/modules/skribilo/documentation/api.scm (api-search-definition):
Call `set-correct-file-encoding!'.
* doc/user/src/outline.txt (Author): Remove accent from last name, as a
temporary hack.
* doc/user/syntax.skb: Call `set-correct-file-encoding!' in the
`outline' syntax example.
* doc/user/user.skb: Use `(skribilo utils syntax)'.
* src/guile/skribilo.scm (skribilo): Replace encoding twiddling with
`set-correct-file-encoding!' call.
* src/guile/skribilo/evaluator.scm (load-document, include-document):
Likewise.
* src/guile/skribilo/source.scm (source-read-lines): Call
`set-correct-file-encoding!'.
(source-read-definition): Likewise.
* src/guile/skribilo/utils/syntax.scm (set-correct-file-encoding!): New
macro.
Diffstat (limited to 'doc/user/syntax.skb')
-rw-r--r-- | doc/user/syntax.skb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/user/syntax.skb b/doc/user/syntax.skb index 730f78d..1442c39 100644 --- a/doc/user/syntax.skb +++ b/doc/user/syntax.skb @@ -190,6 +190,7 @@ to the native ,(tt [skribe]) syntax:]) (flush :side 'left (pre (with-input-from-file src (lambda () + (set-correct-file-encoding!) (let loop ((line (read-line)) (result '())) (if (eof-object? line) @@ -201,9 +202,9 @@ to the native ,(tt [skribe]) syntax:]) (with-output-to-string (lambda () (let* ((read (make-reader 'outline)) - (input (open-input-file src)) - (sexp (read input))) - (pretty-print sexp :width 65))))))) + (input (open-input-file src))) + (set-correct-file-encoding! input) + (pretty-print (read input) :width 65))))))) (p [The ,(tt [outline]) mode makes it possible to quickly create documents that can be output in variety of formats (see ,(numref :text |