about summary refs log tree commit diff
path: root/src/guile/skribilo/evaluator.scm
diff options
context:
space:
mode:
authorLudovic Courtès2010-03-08 00:27:57 +0100
committerLudovic Courtès2010-03-08 00:27:57 +0100
commit86de6d9453a9d747bddadd20fce67e58c4dbe8c7 (patch)
tree44ad52bc21763d13adf5de74d3c50ab92a75fae4 /src/guile/skribilo/evaluator.scm
parentcb2c1a2e6bef653cf9b7aa003d8fcfe09fc4eca0 (diff)
downloadskribilo-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 'src/guile/skribilo/evaluator.scm')
-rw-r--r--src/guile/skribilo/evaluator.scm12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/guile/skribilo/evaluator.scm b/src/guile/skribilo/evaluator.scm
index be223ca..07a578b 100644
--- a/src/guile/skribilo/evaluator.scm
+++ b/src/guile/skribilo/evaluator.scm
@@ -189,12 +189,7 @@
 	   ;; Load it
 	   (with-input-from-file filep
 	     (lambda ()
-               (cond-expand (guile-2
-                             ;; Use the encoding specified by the `coding:'
-                             ;; comment.
-                             (let ((p (current-input-port)))
-                               (set-port-encoding! p
-                                                   (file-encoding p)))))
+               (set-correct-file-encoding!)
 	       (evaluate-document-from-port (current-input-port) ei
                                             :module module
                                             :reader reader)))
@@ -222,10 +217,7 @@
 
     (with-input-from-file full-path
       (lambda ()
-        (cond-expand (guile-2
-                      ;; Use the encoding specified by the `coding:' comment.
-                      (let ((p (current-input-port)))
-                        (set-port-encoding! p (file-encoding p)))))
+        (set-correct-file-encoding!)
         (save-module-excursion
           (lambda ()
             (set-current-module module)