diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-06-23 03:23:44 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-06-23 03:48:22 +0200 |
commit | 1976980d4a272fb7fc3694c734bfc6825edfc721 (patch) | |
tree | 8460db1176c64895e9968447588953fac85fe7d6 /module/sxml/transformations.scm | |
parent | Remove all inline use-modules. (diff) | |
download | calp-1976980d4a272fb7fc3694c734bfc6825edfc721.tar.gz calp-1976980d4a272fb7fc3694c734bfc6825edfc721.tar.xz |
Centralize (almost) all exports to :export in define-module.
Diffstat (limited to '')
-rw-r--r-- | module/sxml/transformations.scm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/module/sxml/transformations.scm b/module/sxml/transformations.scm index 0978d71c..61de42aa 100644 --- a/module/sxml/transformations.scm +++ b/module/sxml/transformations.scm @@ -9,10 +9,13 @@ :use-module (hnh util) :use-module ((srfi srfi-1) :select (concatenate)) :use-module ((sxml transform) :select (pre-post-order)) - ) + :export (attribute-transformer + href-transformer + href-prefixer + )) ;; sxml, bindings → sxml -(define-public (attribute-transformer +(define (attribute-transformer tree attribute-bindings) (define bindings @@ -24,13 +27,13 @@ (pre-post-order tree bindings)) -(define-public (href-transformer tree transformer) +(define (href-transformer tree transformer) (attribute-transformer tree `((href . ,(lambda (_ . content) `(href ,@(transformer (string-concatenate (map ->str content)))) ))))) -(define-public (href-prefixer tree prefix) +(define (href-prefixer tree prefix) (href-transformer tree (lambda (str) (string-append prefix str)))) |