projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.7.6.3:
[sbcl.git]
/
src
/
code
/
describe.lisp
diff --git
a/src/code/describe.lisp
b/src/code/describe.lisp
index
5033aa1
..
35cd265
100644
(file)
--- a/
src/code/describe.lisp
+++ b/
src/code/describe.lisp
@@
-12,10
+12,6
@@
(in-package "SB-IMPL") ;(SB-IMPL, not SB!IMPL, since we're built in warm load.)
\f
(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))
(declaim (ftype (function (t stream)) describe-object))
(defgeneric describe-object ((x t) stream))
@@
-23,10
+19,10
@@
#+sb-doc
"Print a description of the object X."
(let ((stream (out-synonym-of stream-designator)))
#+sb-doc
"Print a description of the object X."
(let ((stream (out-synonym-of stream-designator)))
+ (fresh-line stream)
(pprint-logical-block (stream nil)
(pprint-logical-block (stream nil)
- (fresh-line stream)
(describe-object x stream)
(describe-object x stream)
- (fresh-line stream)))
+ (pprint-newline :mandatory stream)))
(values))
\f
;;;; miscellaneous DESCRIBE-OBJECT methods
(values))
\f
;;;; miscellaneous DESCRIBE-OBJECT methods
@@
-245,6
+241,7
@@
(let* ((kind (info :variable :kind x))
(wot (ecase kind
(:special "special variable")
(let* ((kind (info :variable :kind x))
(wot (ecase kind
(:special "special variable")
+ (:macro "symbol macro")
(:constant "constant")
(:global "undefined variable")
(:alien nil))))
(:constant "constant")
(:global "undefined variable")
(:alien nil))))
@@
-257,6
+254,9
@@
(sb-alien::heap-alien-info-type info)))
(format s "~@<Its current value is ~3I~:_~S.~:>"
(eval x))))
(sb-alien::heap-alien-info-type info)))
(format s "~@<Its current value is ~3I~:_~S.~:>"
(eval x))))
+ ((eq kind :macro)
+ (let ((expansion (info :variable :macro-expansion x)))
+ (format s "~@:_It is a ~A with expansion ~S." wot expansion)))
((boundp x)
(format s "~@:_~@<It is a ~A; its ~_value is ~S.~:>"
wot (symbol-value x)))
((boundp x)
(format s "~@:_~@<It is a ~A; its ~_value is ~S.~:>"
wot (symbol-value x)))