(in-package "SB-IMPL") ;(SB-IMPL, not SB!IMPL, since we're built in warm load.)
\f
-(defvar *describe-indentation-step* 3
- #+sb-doc
- "the number of spaces that sets off each line of a recursive description")
-
(declaim (ftype (function (t stream)) describe-object))
-(defgeneric describe-object ((x t) stream))
+(defgeneric describe-object (x stream))
(defun describe (x &optional (stream-designator *standard-output*))
#+sb-doc
"Print a description of the object X."
(let ((stream (out-synonym-of stream-designator)))
+ (fresh-line stream)
(pprint-logical-block (stream nil)
- (fresh-line stream)
(describe-object x stream)
- (fresh-line stream)))
+ (pprint-newline :mandatory stream)))
(values))
\f
;;;; miscellaneous DESCRIBE-OBJECT methods
(:function (if name
(format s "Function: ~S" x)
(format s "~S is a function." x))))
- (format s "~@:_Its associated name (as in ~S) is ~S."
+ (format s "~@:_~@<Its associated name (as in ~S) is ~2I~_~S.~:>"
'function-lambda-expression
(%fun-name x))
(case (widetag-of x)
(defmethod describe-object ((x function) s)
(%describe-fun x s :function))
-(defgeneric describe-symbol-fdefinition (function stream &key (name nil) ))
+(defgeneric describe-symbol-fdefinition (function stream &key name))
(defmethod describe-symbol-fdefinition ((fun function) stream &key name)
(%describe-fun fun stream :function name))