#+sbcl
(eval-when (:compile-toplevel :load-toplevel :execute)
- (require 'sb-introspect)
- )
+ (require 'sb-introspect))
(defparameter *documentation-types*
'(compiler-macro
(let* ((package (find-package package))
(package-doc (documentation package t))
(result nil))
+ (check-type package package)
(do-external-symbols (symbol package)
(let ((docs (documentation-for-symbol symbol)))
(when docs (setf result (nconc docs result)))))
;;; Begin, rest and end of definition.
(defun argument-list (fname)
- (prog1
- ;; arglist accessors looked up in slime; FIXME: can we depend on
- ;; swank instead? Some of the arglist accessors (not found
- ;; here) are hairy ...
- #+clisp (ext:arglist fname)
- #+sbcl (sb-introspect:function-arglist fname)
- #+openmcl (ccl:arglist fname)
- '(arglist not supported in this implementation)
- ))
+ (sb-introspect:function-arglist fname))
(defvar *character-replacements*
- '((#\* . "star") (#\/ . "slash"))
+ '((#\* . "star") (#\/ . "slash") (#\+ . "plus"))
"Characters and their replacement names that `alphanumize'
uses. If the replacements contain any of the chars they're
supposed to replace, you deserve to lose.")
(package "package")
(setf "setf-expander")
(structure "struct")
- (type (if (find-class symbol)
- (if (documentation symbol 'structure) ; cheesy structness check
- "struct"
- "class")
- "type"))
+ (type (let ((class (find-class symbol)))
+ (etypecase class
+ (structure-class "struct")
+ (standard-class "class")
+ (sb-pcl::condition-class "condition")
+ (null "type"))))
(variable (if (constantp symbol)
"constant"
"var")))
(package "@deffn Package")
(setf "@deffn {Setf Expander}")
(structure "@deftp Structure")
- (type (if (find-class symbol)
- (if (documentation symbol 'structure) ; cheesy structness check
- "@deftp Structure"
- "@deftp Class")
- "@deftp Type"))
+ (type (let ((class (find-class symbol)))
+ (etypecase class
+ (structure-class "@deftp Structure")
+ (standard-class "@deftp Class")
+ (sb-pcl::condition-class "@deftp Condition")
+ (null "@deftp Type"))))
(variable (if (constantp symbol)
"@defvr Constant"
"@defvar"))))
(method-combination "@end deffn")
(package "@end deffn")
(setf "@end deffn")
- ;;(structure "@end deftp") ; caught by `type'
- (type (if (find-class symbol)
- (if (documentation symbol 'structure) ; cheesy structness check
- "@end deftp"
- "@end deftp")
- "@end deftp"))
+ (type "@end deftp")
(variable (if (constantp symbol)
"@end defvr"
"@defvar"))))
# more information.
# how we invoke SBCL
-#
-# Until sbcl-0.6.12.8, the shell variable SBCL was bound to a relative
-# pathname, but now we take care to bind it to an absolute pathname (still
-# generated relative to `pwd` in the tests/ directory) so that tests
-# can chdir before invoking SBCL and still work.
# We create the documentation from the in-tree sbcl if it is found,
# else an installed sbcl is used.
sbclsystem=`pwd`/../../src/runtime/sbcl
if [ -e $sbclsystem ]
then
-SBCL="${1:-$sbclsystem --core `pwd`/../output/sbcl.core}"
+SBCL="${1:-$sbclsystem --core `pwd`/../../output/sbcl.core}"
+export SBCL_HOME=`pwd`/../../contrib
else
SBCL="${1:-`which sbcl`}"
fi
# List of package names that documentation will be created for.
-PACKAGES=":SB-EXT"
+PACKAGES=":SB-ALIEN :SB-EXT :SB-GRAY :SB-MOP :SB-PROFILE :SB-THREAD"
# Output directory. This has to end with a slash (it's interpreted by
# Lisp's `pathname' function) or you lose.
echo /creating docstring snippets from SBCL=\'$SBCL\' for packages \'$PACKAGES\'
-
echo "(progn (load \"docstrings.lisp\") (docstrings-to-texinfo \"$DOCSTRINGDIR\" $PACKAGES) (sb-ext:quit))" | $SBCL --noinform --sysinit /dev/null --userinit /dev/null --noprint --disable-debugger