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/vcomponent/formats/xcal | |
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/vcomponent/formats/xcal/output.scm | 6 | ||||
-rw-r--r-- | module/vcomponent/formats/xcal/parse.scm | 3 | ||||
-rw-r--r-- | module/vcomponent/formats/xcal/types.scm | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/module/vcomponent/formats/xcal/output.scm b/module/vcomponent/formats/xcal/output.scm index 26018d92..87ebd32b 100644 --- a/module/vcomponent/formats/xcal/output.scm +++ b/module/vcomponent/formats/xcal/output.scm @@ -8,7 +8,7 @@ :use-module (datetime) :use-module (srfi srfi-1) :use-module (calp translation) - ) + :export (vcomponent->sxcal ns-wrap)) (define (vline->value-tag vline) @@ -94,7 +94,7 @@ (unless (null? outparams) `(parameters ,@outparams))) -(define-public (vcomponent->sxcal component) +(define (vcomponent->sxcal component) (define tagsymb (downcase-symbol (type component))) @@ -129,6 +129,6 @@ ,(unless (null? (children component)) `(components ,@(map vcomponent->sxcal (children component))))))) -(define-public (ns-wrap sxml) +(define (ns-wrap sxml) `(icalendar (@ (xmlns "urn:ietf:params:xml:ns:icalendar-2.0")) ,sxml)) diff --git a/module/vcomponent/formats/xcal/parse.scm b/module/vcomponent/formats/xcal/parse.scm index d9020858..8537956a 100644 --- a/module/vcomponent/formats/xcal/parse.scm +++ b/module/vcomponent/formats/xcal/parse.scm @@ -10,6 +10,7 @@ :use-module (datetime) :use-module (srfi srfi-1) :use-module (calp translation) + :export (sxcal->vcomponent) ) ;; symbol, ht, (list a) -> non-list @@ -179,7 +180,7 @@ ;; are possibilities, which other parts of the code will crash on. ;; TODO ;; since we are feeding user input into this it really should be fixed. -(define-public (sxcal->vcomponent sxcal) +(define (sxcal->vcomponent sxcal) (define type (symbol-upcase (car sxcal))) (define component (make-vcomponent type)) diff --git a/module/vcomponent/formats/xcal/types.scm b/module/vcomponent/formats/xcal/types.scm index 8f13d3d1..a88b6b04 100644 --- a/module/vcomponent/formats/xcal/types.scm +++ b/module/vcomponent/formats/xcal/types.scm @@ -3,7 +3,7 @@ :use-module (vcomponent formats ical types) :use-module (datetime) :use-module (calp translation) - ) + :export (get-writer)) (define (write-boolean _ v) `(boolean ,(if v "true" "false"))) @@ -50,6 +50,6 @@ (hashq-set! sxml-writers 'RECUR write-recur) (hashq-set! sxml-writers 'TEXT write-text) -(define-public (get-writer type) +(define (get-writer type) (or (hashq-ref sxml-writers type #f) (error (_ "No writer for type") type))) |