aboutsummaryrefslogtreecommitdiff
path: root/module/vcomponent.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-04-30 19:17:35 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-04-30 23:04:01 +0200
commitaa44c16ce953c090b2eb3ce580c60fa8934a7720 (patch)
tree11710e34de01a2ac31e5acac9c8a62af3f09888a /module/vcomponent.scm
parentUpdate server to use app. (diff)
downloadcalp-aa44c16ce953c090b2eb3ce580c60fa8934a7720.tar.gz
calp-aa44c16ce953c090b2eb3ce580c60fa8934a7720.tar.xz
Change call signature for [gs]etf.
Diffstat (limited to 'module/vcomponent.scm')
-rw-r--r--module/vcomponent.scm28
1 files changed, 14 insertions, 14 deletions
diff --git a/module/vcomponent.scm b/module/vcomponent.scm
index 83954f52..aaaf5d36 100644
--- a/module/vcomponent.scm
+++ b/module/vcomponent.scm
@@ -28,17 +28,17 @@
(define-method (init-app calendar-files)
- (setf app 'calendars (load-calendars calendar-files))
+ (setf 'calendars (load-calendars calendar-files))
- (setf app 'events
+ (setf 'events
(concatenate
;; TODO does this drop events?
(map (lambda (cal) (filter (lambda (o) (eq? 'VEVENT (type o)))
(children cal)))
- (getf app 'calendars))))
+ (getf 'calendars))))
- (setf app 'fixed-and-repeating-events
- (let* ((repeating regular (partition repeating? (getf app 'events))))
+ (setf 'fixed-and-repeating-events
+ (let* ((repeating regular (partition repeating? (getf 'events))))
;; (report-time! "Sorting")
;; NOTE There might be instances where we don't care if the
@@ -48,22 +48,22 @@
(sort*! regular date/-time<? (extract 'DTSTART))
(sort*! repeating date/-time<? (extract 'DTSTART)))))
- (setf app 'fixed-events (car (getf app 'fixed-and-repeating-events)))
- (setf app 'repeating-events (cadr (getf app 'fixed-and-repeating-events)))
+ (setf 'fixed-events (car (getf 'fixed-and-repeating-events)))
+ (setf 'repeating-events (cadr (getf 'fixed-and-repeating-events)))
- (setf app 'event-set (calculate-recurrence-set
- (getf app 'fixed-events)
- (getf app 'repeating-events)))
+ (setf 'event-set (calculate-recurrence-set
+ (getf 'fixed-events)
+ (getf 'repeating-events)))
- (setf app 'uid-map
+ (setf 'uid-map
(let ((ht (make-hash-table)))
- (for-each (lambda (event) (hash-set! ht (attr event 'UID) event)) (getf app 'events))
+ (for-each (lambda (event) (hash-set! ht (attr event 'UID) event)) (getf 'events))
ht)))
(define-method (fixed-events-in-range start end)
(filter-sorted (lambda (ev) ((in-date-range? start end)
(as-date (attr ev 'DTSTART))))
- (getf app 'fixed-events)))
+ (getf 'fixed-events)))
(define-method (get-event-by-uid uid)
- (hash-ref (getf app 'uid-map) uid))
+ (hash-ref (getf 'uid-map) uid))