wingo pushed a commit to branch main
in repository guile.
commit ec3bf4e2bae52fe78156f173e56d71919a01e879
Author: Andy Wingo <[email protected]>
AuthorDate: Wed May 24 09:26:01 2023 +0200
pretty-print: inline genwrite:newline-str
* module/ice-9/pretty-print.scm (genwrite:newline-str): Remove.
(generic-write): Just use "\n".
---
module/ice-9/pretty-print.scm | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/module/ice-9/pretty-print.scm b/module/ice-9/pretty-print.scm
index 577545315..ecc6dedf9 100644
--- a/module/ice-9/pretty-print.scm
+++ b/module/ice-9/pretty-print.scm
@@ -32,8 +32,6 @@
;; Author: Marc Feeley ([email protected])
;; Distribution restrictions: none
-(define genwrite:newline-str (make-string 1 #\newline))
-
(define (generic-write
obj display? width max-expr-width per-line-prefix output)
@@ -87,7 +85,7 @@
(define (indent to col)
(and col
(if (< to col)
- (and (out genwrite:newline-str col)
+ (and (out "\n" col)
(out per-line-prefix 0)
(spaces to 0))
(spaces (- to col) col))))
@@ -246,7 +244,7 @@
(out per-line-prefix 0)
(if width
- (out genwrite:newline-str (pp obj 0))
+ (out "\n" (pp obj 0))
(wr obj 0))
;; Return `unspecified'
(if #f #f))