aboutsummaryrefslogtreecommitdiff
path: root/module/calp
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-06-23 04:14:46 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-06-23 04:14:46 +0200
commit2fb88465f7a25b1eac0cdbb78a05de9e78e68bfd (patch)
treec48c312e1d44306039fc00cfe4b5cd611d7f9a3b /module/calp
parentRemove procedure tabset. (diff)
downloadcalp-2fb88465f7a25b1eac0cdbb78a05de9e78e68bfd.tar.gz
calp-2fb88465f7a25b1eac0cdbb78a05de9e78e68bfd.tar.xz
Normalize keyword syntax.
Diffstat (limited to 'module/calp')
-rw-r--r--module/calp/entry-points/text.scm3
-rw-r--r--module/calp/html/view/calendar/month.scm6
-rw-r--r--module/calp/html/view/calendar/week.scm3
-rw-r--r--module/calp/main.scm2
-rw-r--r--module/calp/terminal.scm59
-rw-r--r--module/calp/translation.scm3
6 files changed, 42 insertions, 34 deletions
diff --git a/module/calp/entry-points/text.scm b/module/calp/entry-points/text.scm
index 921afb80..775245eb 100644
--- a/module/calp/entry-points/text.scm
+++ b/module/calp/entry-points/text.scm
@@ -6,6 +6,7 @@
:use-module (hnh util options)
:use-module (calp translation)
:use-module (sxml simple)
+ :use-module (srfi srfi-88)
)
@@ -31,4 +32,4 @@
(current-input-port)
(open-input-file fname)))
(@ (ice-9 rdelim) read-string))
- #:width (or (string->number (option-ref opts 'width "")) 70))))
+ width: (or (string->number (option-ref opts 'width "")) 70))))
diff --git a/module/calp/html/view/calendar/month.scm b/module/calp/html/view/calendar/month.scm
index a19fcdb5..d7cd24ae 100644
--- a/module/calp/html/view/calendar/month.scm
+++ b/module/calp/html/view/calendar/month.scm
@@ -3,6 +3,7 @@
:use-module (srfi srfi-1)
:use-module (srfi srfi-41)
:use-module (srfi srfi-41 util)
+ :use-module (srfi srfi-88)
:use-module (datetime)
:use-module (calp html view calendar shared)
:use-module (calp html config)
@@ -19,7 +20,10 @@
)
;; (stream event-group) -> sxml
-(define* (render-calendar-table key: events start-date end-date pre-start post-end #:allow-other-keys)
+(define* (render-calendar-table key: events
+ start-date end-date
+ pre-start post-end
+ allow-other-keys:)
(define-values (long-events short-events)
;; TODO should be really-long-event? or event-spanning-midnight
diff --git a/module/calp/html/view/calendar/week.scm b/module/calp/html/view/calendar/week.scm
index 828dce41..ef630c36 100644
--- a/module/calp/html/view/calendar/week.scm
+++ b/module/calp/html/view/calendar/week.scm
@@ -3,6 +3,7 @@
:use-module (srfi srfi-1)
:use-module (srfi srfi-41)
:use-module (srfi srfi-71)
+ :use-module (srfi srfi-88)
:use-module (rnrs records syntactic)
:use-module (datetime)
:use-module (calp html view calendar shared)
@@ -26,7 +27,7 @@
)
-(define* (render-calendar key: calendars events start-date end-date #:allow-other-keys)
+(define* (render-calendar key: calendars events start-date end-date allow-other-keys:)
(let* ((long-events short-events (partition long-event? (stream->list (events-between start-date end-date events))))
(range (date-range start-date end-date)))
`((script ,(lambda () (format #t "window.VIEW='week';")))
diff --git a/module/calp/main.scm b/module/calp/main.scm
index d97d3d76..827dbf4e 100644
--- a/module/calp/main.scm
+++ b/module/calp/main.scm
@@ -104,7 +104,7 @@ zoneinfo database, but is currently broken.</p>")
b a))
(define (wrapped-main args)
- (define opts (getopt-long args (getopt-opt options) #:stop-at-first-non-option #t))
+ (define opts (getopt-long args (getopt-opt options) stop-at-first-non-option: #t))
(define stprof (option-ref opts 'statprof #f))
(define repl (option-ref opts 'repl #f))
(define altconfig (option-ref opts 'config #f))
diff --git a/module/calp/terminal.scm b/module/calp/terminal.scm
index e74c5fb8..8f1b7fa9 100644
--- a/module/calp/terminal.scm
+++ b/module/calp/terminal.scm
@@ -1,36 +1,37 @@
(define-module (calp terminal)
- #:use-module (srfi srfi-1)
- #:use-module (datetime)
- #:use-module (srfi srfi-17)
- #:use-module (srfi srfi-26)
- #:use-module ((srfi srfi-41) :select (stream-car))
- #:use-module (hnh util)
- #:use-module (vulgar)
- #:use-module (vulgar info)
- #:use-module (vulgar color)
- #:use-module (vulgar components)
+ :use-module (srfi srfi-1)
+ :use-module (datetime)
+ :use-module (srfi srfi-17)
+ :use-module (srfi srfi-26)
+ :use-module ((srfi srfi-41) :select (stream-car))
+ :use-module (srfi srfi-88)
+ :use-module (hnh util)
+ :use-module (vulgar)
+ :use-module (vulgar info)
+ :use-module (vulgar color)
+ :use-module (vulgar components)
- #:use-module (vcomponent)
- #:use-module (vcomponent datetime)
- #:use-module (vcomponent util search)
- #:use-module (vcomponent util group)
+ :use-module (vcomponent)
+ :use-module (vcomponent datetime)
+ :use-module (vcomponent util search)
+ :use-module (vcomponent util group)
- #:use-module (text util)
- #:use-module (text flow)
+ :use-module (text util)
+ :use-module (text flow)
- #:use-module (ice-9 format)
- #:use-module (ice-9 readline)
- #:use-module (ice-9 match)
+ :use-module (ice-9 format)
+ :use-module (ice-9 readline)
+ :use-module (ice-9 match)
- #:use-module (vulgar termios)
+ :use-module (vulgar termios)
- #:use-module (oop goops)
- #:use-module (oop goops describe)
- #:use-module (calp translation)
+ :use-module (oop goops)
+ :use-module (oop goops describe)
+ :use-module (calp translation)
- #:autoload (vcomponent util instance) (global-event-object)
+ :autoload (vcomponent util instance) (global-event-object)
- #:export (main-loop))
+ :export (main-loop))
;;; TODO change all hard coded escape sequences to proper markup
@@ -45,7 +46,7 @@
(reduce (lambda (str done) (string-append done (string intersection) str))
"" (map (cut make-string <> line) lengths)))
-(define* (display-event-table events #:key
+(define* (display-event-table events key:
(active-element -1)
;; (summary-width 30)
(date-width 17)
@@ -168,7 +169,7 @@
(date->string start))))
(format #t "~a~%"
(unlines (take-to (flow-text (or (prop ev 'DESCRIPTION) "")
- #:width (min 70 width))
+ width: (min 70 width))
(- height 8 5 (length events) 5)))))))
(define (get-line prompt)
@@ -268,8 +269,8 @@
;; display event list
(display-event-table
page
- #:active-element (active-element this)
- #:location-width 15)
+ active-element: (active-element this)
+ location-width: 15)
(paginator->sub-list
paginator (current-page this)
diff --git a/module/calp/translation.scm b/module/calp/translation.scm
index 77c947da..67189e7a 100644
--- a/module/calp/translation.scm
+++ b/module/calp/translation.scm
@@ -2,6 +2,7 @@
:use-module (ice-9 i18n)
:use-module (ice-9 regex)
:use-module (ice-9 match)
+ :use-module (srfi srfi-88)
:export (_ translate yes-no-check))
(bindtextdomain "calp" "/home/hugo/code/calp/localization/")
@@ -20,7 +21,7 @@
(define (_ . msg)
(translate (string-join msg)))
-(define* (yes-no-check string #:optional (locale %global-locale))
+(define* (yes-no-check string optional: (locale %global-locale))
(cond ((string-match (locale-yes-regexp locale) string) 'yes)
((string-match (locale-no-regexp locale) string) 'no)
(else #f)))