Skip to content
Snippets Groups Projects
Commit a8aa96f0 authored by wlott's avatar wlott
Browse files

Changed DESCRIBE to allow T or NIL as the stream argument.

parent 7860c68d
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/describe.lisp,v 1.18 1992/03/26 16:41:20 wlott Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/describe.lisp,v 1.19 1992/05/06 08:52:00 wlott Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -66,10 +66,9 @@ ...@@ -66,10 +66,9 @@
;;; DESCRIBE sets up the output stream and calls DESCRIBE-AUX, which does the ;;; DESCRIBE sets up the output stream and calls DESCRIBE-AUX, which does the
;;; hard stuff. ;;; hard stuff.
;;; ;;;
(defun describe (x &optional (stream *standard-output*)) (defun describe (x &optional stream)
"Prints a description of the object X. "Prints a description of the object X."
See also *describe-level*, defdescribe, *describe-verbose*, (declare (type (or stream (member t nil)) stream))
*describe-print-level*, *describe-print-length*, and *describe-indentation*."
(unless *describe-output* (unless *describe-output*
(setq *describe-output* (make-indenting-stream *standard-output*))) (setq *describe-output* (make-indenting-stream *standard-output*)))
(cond (*in-describe* (cond (*in-describe*
...@@ -79,7 +78,11 @@ ...@@ -79,7 +78,11 @@
(indenting-further *describe-output* *describe-indentation* (indenting-further *describe-output* *describe-indentation*
(describe-aux x))))) (describe-aux x)))))
(t (t
(setf (indenting-stream-stream *describe-output*) stream) (setf (indenting-stream-stream *describe-output*)
(case stream
((t) *terminal-io*)
((nil) *standard-output*)
(t stream)))
(let ((*standard-output* *describe-output*) (let ((*standard-output* *describe-output*)
(*print-level* (or *describe-print-level* *print-level*)) (*print-level* (or *describe-print-level* *print-level*))
(*print-length* (or *describe-print-length* *print-length*)) (*print-length* (or *describe-print-length* *print-length*))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment