aboutsummaryrefslogtreecommitdiff
path: root/module/vcalendar.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-03-31 00:12:00 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-03-31 00:12:00 +0100
commit49ffe09b4290ee3c1189660332fca51583c3916a (patch)
tree80fc507b6c231fd820092752086b9400788d2d3e /module/vcalendar.scm
parentAdd cval field to LLIST. (diff)
downloadcalp-49ffe09b4290ee3c1189660332fca51583c3916a.tar.gz
calp-49ffe09b4290ee3c1189660332fca51583c3916a.tar.xz
Add as-{string,symb}.
Diffstat (limited to 'module/vcalendar.scm')
-rw-r--r--module/vcalendar.scm9
1 files changed, 4 insertions, 5 deletions
diff --git a/module/vcalendar.scm b/module/vcalendar.scm
index bea9c0dc..51c4f8e3 100644
--- a/module/vcalendar.scm
+++ b/module/vcalendar.scm
@@ -31,13 +31,13 @@
(define (set-attr! component attr value)
(%vcomponent-set-attribute!
component
- (if (symbol? attr) (symbol->string attr) attr)
+ (as-string attr)
value))
(define (get-attr component attr)
(%vcomponent-get-attribute
component
- (if (symbol? attr) (symbol->string attr) attr)))
+ (as-string attr)))
;; Enables symmetric get and set:
;; (set! (attr ev "KEY") 10)
@@ -67,9 +67,8 @@
(cut get-attr <> field))
(define-public (key=? k1 k2)
- (eq?
- (if (string? k1) (string->symbol k1) k1)
- (if (string? k2) (string->symbol k2) k2)))
+ (eq? (as-symb k1)
+ (as-symb k2)))
(define* (make-vcomponent #:optional path)
(if (not path)