doc/list-exports.lisp: Better pretty formatting for keywords.
[sod] / doc / list-exports.lisp
index 710da87..ef10b00 100644 (file)
 
 (defmethod form-list-exports ((head (eql 'definst)) tail)
   (destructuring-bind (code (streamvar &key export) args &body body) tail
-    (declare (ignore streamvar args body))
+    (declare (ignore streamvar body))
     (and export
-        (list (symbolicate code '-inst)
-              (symbolicate 'make- code '-inst)))))
+        (list* (symbolicate code '-inst)
+               (symbolicate 'make- code '-inst)
+               (mapcar (lambda (arg)
+                         (symbolicate 'inst- arg))
+                       args)))))
 
 (defmethod form-list-exports ((head (eql 'define-tagged-type)) tail)
   (destructuring-bind (kind what) tail
   (let* ((pkg (symbol-package symbol))
         (exportp (member symbol (list-exported-symbols pkg))))
     (format nil "~(~:[~A:~:[:~;~]~;~2*~]~A~)"
-           (and exportp (eq pkg package)) (best-package-name pkg)
+           (and exportp (eq pkg package))
+           (if (keywordp symbol) "" (best-package-name pkg))
            exportp (symbol-name symbol))))
 
 (defun analyse-classes (package)
                  (pretty-symbol-name sym package)
                  (cdr def))))
       (terpri)))
+  (format t "Classes:~%")
   (analyse-classes package)
   (terpri))