[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 02/18: pretty-print: inline genwrite:newline-str
From: |
Andy Wingo |
Subject: |
[Guile-commits] 02/18: pretty-print: inline genwrite:newline-str |
Date: |
Thu, 8 Jun 2023 04:26:41 -0400 (EDT) |
wingo pushed a commit to branch main
in repository guile.
commit ec3bf4e2bae52fe78156f173e56d71919a01e879
Author: Andy Wingo <wingo@pobox.com>
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 (feeley@iro.umontreal.ca)
;; 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))
- [Guile-commits] 13/18: Inline generic-write into pretty-print, (continued)
- [Guile-commits] 13/18: Inline generic-write into pretty-print, Andy Wingo, 2023/06/08
- [Guile-commits] 10/18: Modernize soft ports, Andy Wingo, 2023/06/08
- [Guile-commits] 01/18: pretty-print: Use string-concatenate-reverse, Andy Wingo, 2023/06/08
- [Guile-commits] 17/18: Deprecate (ice-9 lineio), Andy Wingo, 2023/06/08
- [Guile-commits] 18/18: Fix exn dispatch for exns within pre-unwind handlers, Andy Wingo, 2023/06/08
- [Guile-commits] 09/18: Implement R6RS custom textual ports, Andy Wingo, 2023/06/08
- [Guile-commits] 11/18: Rewrite pretty-print to rely on port-column, abort early, Andy Wingo, 2023/06/08
- [Guile-commits] 14/18: truncated-print: use call-with-truncating-output-string, Andy Wingo, 2023/06/08
- [Guile-commits] 12/18: pretty-print: width arg is never false, Andy Wingo, 2023/06/08
- [Guile-commits] 15/18: Fix allow-newline? in call-with-truncating-output-string, Andy Wingo, 2023/06/08
- [Guile-commits] 02/18: pretty-print: inline genwrite:newline-str,
Andy Wingo <=