aboutsummaryrefslogtreecommitdiff
path: root/module/text/flow.scm
diff options
context:
space:
mode:
Diffstat (limited to 'module/text/flow.scm')
-rw-r--r--module/text/flow.scm13
1 files changed, 7 insertions, 6 deletions
diff --git a/module/text/flow.scm b/module/text/flow.scm
index 315bea06..77f39a9f 100644
--- a/module/text/flow.scm
+++ b/module/text/flow.scm
@@ -8,21 +8,22 @@
:use-module (text util)
:use-module (srfi srfi-1)
:use-module (srfi srfi-71)
+ :use-module (srfi srfi-88)
:export (flow-text))
;; str -> (str)
-(define* (flow-text str #:key (width 70))
+(define* (flow-text str key: (width 70))
(flatten
- (map (lambda (line) (justify-line line #:width width))
+ (map (lambda (line) (justify-line line width: width))
(lines str))))
-;; Splits and justifies the given line to @var{#:width}.
+;; Splits and justifies the given line to @var{width:}.
;; Returns a list of justified strings.
;; str -> (str)
-(define* (justify-line line #:key (width 70))
+(define* (justify-line line key: (width 70))
(let recur ((lst (words line)))
(let ((head tail (span
(let ((w 0))
@@ -36,11 +37,11 @@
;; than our max width. Add it as is and continue
;; (while crying).
(cons (car tail) (recur (cdr tail))))
- (else (cons (justify-line-helper head #:width width)
+ (else (cons (justify-line-helper head width: width)
(recur tail)))))))
;; (str) -> str
-(define* (justify-line-helper words #:key (width 70))
+(define* (justify-line-helper words key: (width 70))
(let* ((phrase-length (true-string-length (string-concatenate/shared words)))
(needed-spaces (- width phrase-length))
(slots (1- (length words)))