X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fdescribe.lisp;h=1f13b6fb4b07a4755a584b681f31aabff12c9744;hb=b429c5c0557ed790e84dae4d6c35e06ab1a14416;hp=6b73804840c2f371aa8e721b6746b4a072cc861a;hpb=e36adf21322abc31b1b61e20e93516f995b70c36;p=sbcl.git diff --git a/src/code/describe.lisp b/src/code/describe.lisp index 6b73804..1f13b6f 100644 --- a/src/code/describe.lisp +++ b/src/code/describe.lisp @@ -167,43 +167,39 @@ (base-char "base-char") (t "character"))) -(declaim (ftype (function (t stream)) describe-object)) (defgeneric describe-object (x stream)) -(defvar *in-describe* nil) - -(defmethod describe-object :around (x s) - (cond (*in-describe* - (call-next-method)) - (t - (format s "~&~A~% [~A]~%" - (object-self-string x) - (object-type-string x)) - (pprint-logical-block (s nil) - (call-next-method x s))))) - ;;; Catch-all. (defmethod describe-object ((x t) s) + (format s "~&~A~% [~A]~%" + (object-self-string x) + (object-type-string x)) (values)) (defmethod describe-object ((x cons) s) + (call-next-method) (describe-function x nil s)) (defmethod describe-object ((x function) s) + (call-next-method) (describe-function nil x s)) (defmethod describe-object ((x class) s) + (call-next-method) (describe-class nil x s) (describe-instance x s)) (defmethod describe-object ((x sb-pcl::slot-object) s) + (call-next-method) (describe-instance x s)) (defmethod describe-object ((x character) s) + (call-next-method) (format s "~%:_Char-code: ~S" (char-code x)) (format s "~%:_Char-name: ~A~%_" (char-name x))) (defmethod describe-object ((x array) s) + (call-next-method) (format s "~%Element-type: ~S" (array-element-type x)) (if (vectorp x) (if (array-has-fill-pointer-p x) @@ -226,9 +222,11 @@ (terpri s))) (defmethod describe-object ((x hash-table) s) - ;; Don't print things which are already apparent from the printed representation - ;; -- COUNT, TEST, and WEAKNESS - (format s "~%Occupancy: ~,1F" (float (/ (hash-table-count x) (hash-table-size x)))) + (call-next-method) + ;; Don't print things which are already apparent from the printed + ;; representation -- COUNT, TEST, and WEAKNESS + (format s "~%Occupancy: ~,1F" (float (/ (hash-table-count x) + (hash-table-size x)))) (format s "~%Rehash-threshold: ~S" (hash-table-rehash-threshold x)) (format s "~%Rehash-size: ~S" (hash-table-rehash-size x)) (format s "~%Size: ~S" (hash-table-size x)) @@ -236,6 +234,7 @@ (terpri s)) (defmethod describe-object ((symbol symbol) stream) + (call-next-method) ;; Describe the value cell. (let* ((kind (info :variable :kind symbol)) (wot (ecase kind @@ -319,6 +318,7 @@ (terpri stream)))) (defmethod describe-object ((package package) stream) + (call-next-method) (describe-documentation package t stream) (flet ((humanize (list) (sort (mapcar (lambda (x)