projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.6.11.6:
[sbcl.git]
/
src
/
code
/
pprint.lisp
diff --git
a/src/code/pprint.lisp
b/src/code/pprint.lisp
index
df096b1
..
b23a4dc
100644
(file)
--- a/
src/code/pprint.lisp
+++ b/
src/code/pprint.lisp
@@
-97,6
+97,11
@@
(declare (type posn posn) (type pretty-stream stream)
(values posn))
(index-column (posn-index posn stream) stream))
(declare (type posn posn) (type pretty-stream stream)
(values posn))
(index-column (posn-index posn stream) stream))
+
+;;; Is it OK to do pretty printing on this stream at this time?
+(defun print-pretty-on-stream-p (stream)
+ (and (pretty-stream-p stream)
+ *print-pretty*))
\f
;;;; stream interface routines
\f
;;;; stream interface routines
@@
-628,10
+633,6
@@
\f
;;;; user interface to the pretty printer
\f
;;;; user interface to the pretty printer
-;;; MNA: cmucl-commit: Wed, 27 Dec 2000 07:42:40 -0800 (PST)
-;;; pprint-newline, pprint-indent, and pprint-tab should do nothing if
-;;; *print-pretty* is not true.
-
(defun pprint-newline (kind &optional stream)
#!+sb-doc
"Output a conditional newline to STREAM (which defaults to
(defun pprint-newline (kind &optional stream)
#!+sb-doc
"Output a conditional newline to STREAM (which defaults to
@@
-659,7
+660,7
@@
((t) *terminal-io*)
((nil) *standard-output*)
(t stream))))
((t) *terminal-io*)
((nil) *standard-output*)
(t stream))))
- (when (and (pretty-stream-p stream) *print-pretty*)
+ (when (print-pretty-on-stream-p stream)
(enqueue-newline stream kind)))
nil)
(enqueue-newline stream kind)))
nil)
@@
-682,7
+683,7
@@
((t) *terminal-io*)
((nil) *standard-output*)
(t stream))))
((t) *terminal-io*)
((nil) *standard-output*)
(t stream))))
- (when (and (pretty-stream-p stream) *print-pretty*)
+ (when (print-pretty-on-stream-p stream)
(enqueue-indent stream relative-to n)))
nil)
(enqueue-indent stream relative-to n)))
nil)
@@
-707,7
+708,7
@@
((t) *terminal-io*)
((nil) *standard-output*)
(t stream))))
((t) *terminal-io*)
((nil) *standard-output*)
(t stream))))
- (when (and (pretty-stream-p stream) *print-pretty*)
+ (when (print-pretty-on-stream-p stream)
(enqueue-tab stream kind colnum colinc)))
nil)
(enqueue-tab stream kind colnum colinc)))
nil)