From 0f968fcc28bbb48ad0d65938b05bed3d75c7819c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Wed, 24 Apr 2019 19:40:46 +0200 Subject: Add {mod,set}/r! `set!' by default has an unspecified return value. But that haven't stopped me from using that (set! (acc obj) val) returns the value returned by the internal setter function. This change requires you to explicitly request the returning version of set, which returns the value of the last set field. --- module/output/text.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/output/text.scm') diff --git a/module/output/text.scm b/module/output/text.scm index 7c99e12f..274c79e2 100644 --- a/module/output/text.scm +++ b/module/output/text.scm @@ -23,7 +23,7 @@ (string-concatenate/shared (merge words (map (lambda (n) (make-string n #\space)) space-list) - (let ((f #t)) (lambda _ (mod! f not))))))) + (let ((f #t)) (lambda _ (mod/r! f not))))))) ;; Splits and justifies the given line to @var{#:width}. @@ -34,7 +34,7 @@ (let* ((head tail (take-drop-while (let ((w 0)) (lambda (word) ; Take words until we are above the limit. - (< (mod! w = (+ 1 (string-length word))) + (< (mod/r! w = (+ 1 (string-length word))) width))) lst))) (cond ((null? tail) (list (unwords head))) ; Don't justify last line. -- cgit v1.2.3