mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-28 16:00:22 +02:00
pretty-print: inline genwrite:newline-str
* module/ice-9/pretty-print.scm (genwrite:newline-str): Remove. (generic-write): Just use "\n".
This commit is contained in:
parent
f74565defd
commit
ec3bf4e2ba
1 changed files with 2 additions and 4 deletions
|
@ -32,8 +32,6 @@
|
||||||
;; Author: Marc Feeley (feeley@iro.umontreal.ca)
|
;; Author: Marc Feeley (feeley@iro.umontreal.ca)
|
||||||
;; Distribution restrictions: none
|
;; Distribution restrictions: none
|
||||||
|
|
||||||
(define genwrite:newline-str (make-string 1 #\newline))
|
|
||||||
|
|
||||||
(define (generic-write
|
(define (generic-write
|
||||||
obj display? width max-expr-width per-line-prefix output)
|
obj display? width max-expr-width per-line-prefix output)
|
||||||
|
|
||||||
|
@ -87,7 +85,7 @@
|
||||||
(define (indent to col)
|
(define (indent to col)
|
||||||
(and col
|
(and col
|
||||||
(if (< to col)
|
(if (< to col)
|
||||||
(and (out genwrite:newline-str col)
|
(and (out "\n" col)
|
||||||
(out per-line-prefix 0)
|
(out per-line-prefix 0)
|
||||||
(spaces to 0))
|
(spaces to 0))
|
||||||
(spaces (- to col) col))))
|
(spaces (- to col) col))))
|
||||||
|
@ -246,7 +244,7 @@
|
||||||
|
|
||||||
(out per-line-prefix 0)
|
(out per-line-prefix 0)
|
||||||
(if width
|
(if width
|
||||||
(out genwrite:newline-str (pp obj 0))
|
(out "\n" (pp obj 0))
|
||||||
(wr obj 0))
|
(wr obj 0))
|
||||||
;; Return `unspecified'
|
;; Return `unspecified'
|
||||||
(if #f #f))
|
(if #f #f))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue