[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 02/08: pretty-print: inline genwrite:newline-str
From: |
Andy Wingo |
Subject: |
[Guile-commits] 02/08: pretty-print: inline genwrite:newline-str |
Date: |
Mon, 29 May 2023 04:03:38 -0400 (EDT) |
wingo pushed a commit to branch wip-custom-ports
in repository guile.
commit 5851006962cf6eef43fae35bbf906fb9ca5efd28
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] branch wip-custom-ports created (now 9df5a8dfb), Andy Wingo, 2023/05/29
- [Guile-commits] 03/08: pretty-print: inline some handling of read macros, Andy Wingo, 2023/05/29
- [Guile-commits] 04/08: Add "custom ports", Andy Wingo, 2023/05/29
- [Guile-commits] 06/08: Use custom binary output ports for make-chunked-output-port, Andy Wingo, 2023/05/29
- [Guile-commits] 01/08: pretty-print: Use string-concatenate-reverse, Andy Wingo, 2023/05/29
- [Guile-commits] 02/08: pretty-print: inline genwrite:newline-str,
Andy Wingo <=
- [Guile-commits] 05/08: Rewrite custom binary ports in Scheme, in terms of custom ports, Andy Wingo, 2023/05/29
- [Guile-commits] 08/08: Rewrite soft ports in Scheme, Andy Wingo, 2023/05/29
- [Guile-commits] 07/08: Implement R6RS custom textual ports, Andy Wingo, 2023/05/29