0.7.2.3:
authorWilliam Harold Newman <william.newman@airmail.net>
Wed, 27 Mar 2002 00:14:21 +0000 (00:14 +0000)
committerWilliam Harold Newman <william.newman@airmail.net>
Wed, 27 Mar 2002 00:14:21 +0000 (00:14 +0000)
stole Eric Marsden's CMU CL DESCRIBE-type-specifier patch
for CMU CL (cmucl-imp 2002-03-21)
other cleanups/fixes on DESCRIBE...
...made sub-DESCRIBE of SYMBOL-NAMED-CLASS go to S instead
of *STANDARD-OUTPUT*
...converted some raw format control to pretty-printer format
control
...wrapped pprint-logical-blocks around some stuff which
doesn't benefit from internal line breaks

NEWS
src/code/describe.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index ef442af..8e5819c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1058,6 +1058,13 @@ changes in sbcl-0.7.2 relative to sbcl-0.7.1:
        encapsulation also seems closer to the spirit of the ANSI
        specification.)
 
+changes in sbcl-0.7.2 relative to sbcl-0.7.1:
+  * cleanups on SPARC, both Linux and Solaris, and for gcc>=3 (thanks
+    to Christophe Rhodes and Nathan Froyd)
+  * DESCRIBE on a symbol now says something about DEFTYPE-style
+    expansions associated with the symbol (thanks to Eric Marsden's
+    patch for CMU CL).
+
 planned incompatible changes in 0.7.x:
 * When the profiling interface settles down, maybe in 0.7.x, maybe
   later, it might impact TRACE. They both encapsulate functions, and
index 0638202..5033aa1 100644 (file)
        (multiple-value-bind (symbol status)
            (find-symbol (symbol-name x) package)
          (declare (ignore symbol))
-         (format s "~S is ~_an ~(~A~) symbol ~_in ~S."
+         (format s "~@<~S is ~_an ~(~A~) symbol ~_in ~S.~:>"
                  x status (symbol-package x)))
-       (format s "~S is ~_an uninterned symbol." x)))
+       (format s "~@<~S is ~_an uninterned symbol.~:>" x)))
   ;; TO DO: We could grovel over all packages looking for and
   ;; reporting other phenomena, e.g. IMPORT and SHADOW, or
   ;; availability in some package even after (SYMBOL-PACKAGE X) has
        (format s "~@<Its current value is ~3I~:_~S.~:>"
                (eval x))))
      ((boundp x)
-      (format s "~@:_It is a ~A; its ~_value is ~S." wot (symbol-value x)))
+      (format s "~@:_~@<It is a ~A; its ~_value is ~S.~:>"
+             wot (symbol-value x)))
      ((not (eq kind :global))
-      (format s "~@:_It is a ~A; no current value." wot)))
+      (format s "~@:_~@<It is a ~A; no current value.~:>" wot)))
 
     (when (eq (info :variable :where-from x) :declared)
-      (format s "~@:_Its declared type ~_is ~S."
+      (format s "~@:_~@<Its declared type ~_is ~S.~:>"
              (type-specifier (info :variable :type x))))
 
     (%describe-doc x s 'variable kind))
        ((fboundp x)
          (describe-symbol-fdefinition (fdefinition x) s :name x)))
 
-  ;; FIXME: Print out other stuff from the INFO database:
-  ;;   * Does it name a type?
-  ;;   * Is it a structure accessor? (This is important since those are 
-  ;;     magical in some ways, e.g. blasting the structure if you 
-  ;;     redefine them.)
-
   ;; Print other documentation.
   (%describe-doc x s 'structure "Structure")
   (%describe-doc x s 'type "Type")
   (%describe-doc x s 'setf "Setf macro")
-
   (dolist (assoc (info :random-documentation :stuff x))
     (format s
            "~@:_Documentation on the ~(~A~):~@:_~A"
            (car assoc)
            (cdr assoc)))
   
-  ;; Describe the associated class, if any.
+  ;; Mention the associated type information, if any.
+  ;;
+  ;; As of sbcl-0.7.2, (INFO :TYPE :KIND X) might be
+  ;;   * :PRIMITIVE, which is handled by the FIND-CLASS case.
+  ;;   * :DEFINED, which is handled specially.
+  ;;   * :INSTANCE, which is handled by the FIND-CLASS case.
+  ;;   * :FORTHCOMING-DEFCLASS-TYPE, which is an internal-to-the-compiler
+  ;;     note that we don't try to report.
+  ;;   * NIL, in which case there's nothing to see here, move along.
+  (when (eq (info :type :kind x) :defined)
+    (format s "~@:_It names a type specifier."))
   (let ((symbol-named-class (cl:find-class x nil)))
     (when symbol-named-class
-      (format s "~&It names a class ~A." symbol-named-class)
-      (describe symbol-named-class))))
+      (format s "~@:_It names a class ~A." symbol-named-class)
+      (describe symbol-named-class s))))
index 45ed2cb..3f8d9ad 100644 (file)
@@ -18,4 +18,4 @@
 ;;; for internal versions, especially for internal versions off the
 ;;; main CVS branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
 
-"0.7.2.2"
+"0.7.2.3"