aboutsummaryrefslogtreecommitdiff
path: root/module/vcomponent
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-02-23 02:18:57 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2023-02-23 04:03:36 +0100
commit5ab726d27c2a300fefbcc843ad01a7c04590ff15 (patch)
treedb9e7bc8e047fdc5242a9b7c55883c6892770963 /module/vcomponent
parentExtend `for'-macro to allow improper list elements. (diff)
downloadcalp-5ab726d27c2a300fefbcc843ad01a7c04590ff15.tar.gz
calp-5ab726d27c2a300fefbcc843ad01a7c04590ff15.tar.xz
Change group-by to return direct pairs.
Each value in the return of group-by must have exactly two values, so cons pairs (instead of lists) is much better.
Diffstat (limited to 'module/vcomponent')
-rw-r--r--module/vcomponent/recurrence/display/en.scm4
-rw-r--r--module/vcomponent/recurrence/display/sv.scm4
-rw-r--r--module/vcomponent/util/instance/methods.scm2
3 files changed, 5 insertions, 5 deletions
diff --git a/module/vcomponent/recurrence/display/en.scm b/module/vcomponent/recurrence/display/en.scm
index c711a75c..18d11dba 100644
--- a/module/vcomponent/recurrence/display/en.scm
+++ b/module/vcomponent/recurrence/display/en.scm
@@ -26,13 +26,13 @@
(list "every "
(add-enumeration-punctuation
(map (lambda (d) (list (week-day-name (cdr d))))
- (cadr group)
+ (cdr group)
)))]
[else
(list (number->string-ordinal (car group)) " "
(add-enumeration-punctuation
(map (lambda (d) (list (week-day-name (cdr d)) "en"))
- (cadr group))))])
+ (cdr group))))])
)
groups))))
diff --git a/module/vcomponent/recurrence/display/sv.scm b/module/vcomponent/recurrence/display/sv.scm
index 2bd70657..ee8fc3fd 100644
--- a/module/vcomponent/recurrence/display/sv.scm
+++ b/module/vcomponent/recurrence/display/sv.scm
@@ -31,7 +31,7 @@
(list "varje "
(add-enumeration-punctuation
(map (lambda (d) (list (week-day-name (cdr d))))
- (cadr group)
+ (cdr group)
)))]
[else
(list (number->string-ordinal
@@ -40,7 +40,7 @@
" "
(add-enumeration-punctuation
(map (lambda (d) (list (week-day-name (cdr d)) "en"))
- (cadr group))))])
+ (cdr group))))])
)
groups))))
diff --git a/module/vcomponent/util/instance/methods.scm b/module/vcomponent/util/instance/methods.scm
index 5651b265..75510009 100644
--- a/module/vcomponent/util/instance/methods.scm
+++ b/module/vcomponent/util/instance/methods.scm
@@ -96,7 +96,7 @@
type (concatenate
(map children (slot-ref this 'calendars)))))
(events (awhen (assoc-ref groups 'VEVENT)
- (car it)))
+ it))
(removed remaining (partition (extract 'X-HNH-REMOVED) events)))
;; TODO figure out what to do with removed events