guile-commits
[Top][All Lists]
Advanced

[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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]