cleanup DESCRIBE of symbols naming type specifiers a bit
[sbcl.git] / src / code / describe.lisp
index d9c6039..8c7802f 100644 (file)
                 (:alien "an alien variable"))))
     (when (or (not (eq :unknown kind)) (boundp symbol))
       (pprint-logical-block (stream nil)
-        (format stream "~%~A names ~A:" symbol wot)
+        (format stream "~@:_~A names ~A:" symbol wot)
         (pprint-indent :block 2 stream)
         (when (eq (info :variable :where-from symbol) :declared)
           (format stream "~@:_Declared type: ~S"
                   (type-specifier (info :variable :type symbol))))
+        (when (info :variable :always-bound symbol)
+          (format stream "~@:_Declared always-bound."))
         (cond
           ((eq kind :alien)
            (let ((info (info :variable :alien-info symbol)))
     (when fun
       (pprint-newline :mandatory stream)
       (pprint-logical-block (stream nil)
-        (pprint-indent :block 2 stream)
-        (format stream "~A names a ~@[primitive~* ~]type-specifier:"
+        (format stream "~@:_~A names a ~@[primitive~* ~]type-specifier:"
                 symbol
                 (eq kind :primitive))
+        (pprint-indent :block 2 stream)
         (describe-documentation symbol 'type stream (eq t fun))
         (unless (eq t fun)
           (describe-lambda-list (if (eq :primitive kind)
       (let ((metaclass-name (class-name (class-of class))))
         (pprint-logical-block (stream nil)
           (when by-name
-            (format stream "~%~A names the ~(~A~) ~S:"
+            (format stream "~@:_~A names the ~(~A~) ~S:"
                     name
                     metaclass-name
                     class)
                                             (quiet-doc slotd t)))
                                     slots))
                     (format stream "~@:_No direct slots."))))
+          (pprint-indent :block 0 stream)
           (pprint-newline :mandatory stream))))))
 
 (defun describe-instance (object stream)
                        (format stream "~@:_Source file: ~A" namestring))
                       ((sb-di:debug-source-form source)
                        (format stream "~@:_Source form:~@:_  ~S"
-                               (sb-di:debug-source-form source)))
-                      (t (bug "Don't know how to use a DEBUG-SOURCE without ~
-                               a namestring or a form."))))))))
+                               (sb-di:debug-source-form source)))))))))
       #+sb-eval
       (let ((source (sb-eval:interpreted-function-source-location function)))
         (when source