Commits

Paul Sexton  committed 6342fe1

Added ability to choose a cascading style sheet for HTML export.
Added ability to introspect and retrieve lambda lists of functions and macros (cribbed from SLIME source).
Added some example classes to show off class hierarchy diagrams.

  • Participants
  • Parent commits ad6153e

Comments (0)

Files changed (3)

 ;;;;
 ;;;; todo table of slots at beginning of each class def
 ;;;;
-;;;; (document-package :clod "~/lisp/clod/doc/clod-doc.org"
+;;;; Generate documentation for this package with:
+;;;; (clod:document-package :clod "~/lisp/clod/doc/clod-doc.org"
 ;;;;     :title "CLOD" :author "Paul Sexton" :email "eeeickythump@gmail.com")
 ;;;;
 
   (:shadowing-import-from :closer-mop
                           #:standard-method
                           #:standard-generic-function
+                          #:ensure-generic-function
                           #:defmethod
                           #:defgeneric
                           #:standard-class)
 - Easy export to multiple file formats: text, HTML, LaTeX -> PDF...
 - You can edit the output within Emacs, which is already the IDE of most
   Commn Lisp programmers.
-- If GraphViz is installed, automatically create a diagram showing the
+- If GraphViz is installed, automatically create a diagram illustrating the
   package's class hierarchy -- see http://www.graphviz.org/
 - Org markup has many cool tricks. Some examples of useful things you can
   put in docstrings:
     documents, eg:
 ;;; (defun hello (a &key b)
 ;;;    (print \"Hello, world!\"))
+  - Because CLOD works by introspection rather than parsing files,
+    it copes effortlessly with unusual toplevel forms. Documentation
+    generators that parse files usually won't be able to tell that your
+    toplevel macro `=(defclass-easy ...)=' (or whatever) actually
+    expands to a class definition.
+  - For the same reason, CLOD avoids the problems with dependencies that
+    can trouble other documentation generators (i.e. difficulties
+    generating correct documentation unless you manually move things
+    around in the source so that the doc generator finds things in
+    the `right' order).
+  - Easily change the global appearance of the document by specifying a
+    cascading style sheet (/note: only affects HTML export from Org mode/)
 
 * Dependencies
 
 
 * Writing the documentation
 
-All documentation produced by CLOD is obtained by introspection, i.e.  the
+All documentation produced by CLOD is obtained by /introspection/, i.e. by the
 running CL process examining itself. If a symbol has an associated docstring,
 it will be used by CLOD to produce the documentation for that symbol.
 
 - *Hyperlinks* are created using
   : [[double square brackets]]
   Any text surrounded by these brackets will link to the same text (case
-  insensitive) surrounded by =<<double angle brackets>>=. CLOD uses this to define
-  hyperlinks for all symbols in the package. Every symbol MYSYMBOL has:
+  insensitive) surrounded by =<<double angle brackets>>=. CLOD uses this to
+  define hyperlinks for all symbols in the package. Every symbol MYSYMBOL has:
   1. A hyperlink =<<function MYSYMBOL>>= if MYSYMBOL is a function,
      =<<variable MYSYMBOL>>= if it is a global variable, etc.
-  2. A hyperlink =<<MYSYMBOL>>= which will either link to MYSYMBOL's documentation,
-     or to a 'disambiguation section' if the same symbol has multiple meanings
-     (eg there is both a function and a variable called MYSYMBOL).
+  2. A hyperlink =<<MYSYMBOL>>= which will either link to MYSYMBOL's
+     documentation, or to a 'disambiguation section' if the same symbol has
+     multiple meanings (eg there is both a function and a variable called
+     MYSYMBOL).
 - Org mode has the ability to use Emacs' font-lock mode to produce source code
-  snippets that are correctly syntax highlighted for any major mode.
-  To use this normally requires surrounding the code with =#+BEGIN_SRC ... #+END_SRC=.
+  snippets that are correctly syntax highlighted for any major mode.  To use
+  this normally requires surrounding the code with =#+BEGIN_SRC ... #+END_SRC=.
   CLOD provides a shortcut: Any lines within docstrings that begin with three
-  semicolons ;;; are assumed to be example lisp source code. The first 3
+  semicolons =;;;= are assumed to be example lisp source code. The first 3
   semicolons are removed and the rest of the line is syntax highlighted.
 
 * Example
 
 Here is the docstring for [[document-package]].
 
-: * Usage
-: : (document-package PKG FILE/STREAM &key AUTO-LINKS
-: :      LINES-BETWEEN-SECTIONS BRIEF-METHODS TITLE
-: :      AUTHOR EMAIL)
 : * Arguments
 : - PKG :: A package name or package object.
 : - FILE/STREAM :: A string (filename), stream object, or =NIL=.
 : - AUTO-LINKS :: Boolean.
 : - LINES-BETWEEN-SECTIONS :: Boolean.
 : - BRIEF-METHODS :: Boolean.
+: - STYLE-SHEET :: A string.
 : - TITLE :: A string.
 : - AUTHOR :: A string.
 : - EMAIL :: A string.
 :   sections, just like functions and generic functions. Most people put
 :   'method' documentation in the docstrings of their generic functions, but
 :   if you set docstrings for individual methods then set this to nil.
+: - =STYLE-SHEET= specifies the name of a Cascading Style Sheet (.CSS) file
+:   which will be used as the style for the document if you export it
+:   to HTML from org mode.
+:
+: * Example
+: ;;; (clod:document-package :mypkg \"mypkg-doc.org\"
+: ;;;      :style-sheet \"swiss.css\" :title \"My Package\"
+: ;;;      :author \"F. B. Quux\" :email \"quux@gmail.com\")
 : 
 : * See also
 : - [[document-packages]]
-
-* Limitations
-
-- There is no portable way to access the lambda lists of functions. Thus, you
-  need to describe these manually in function docstrings.
 "))
 
 (in-package :clod)
 (defvar *lines-between-sections* nil
   "If true, sections of the document will be separated by horizontal lines.")
 (defvar *brief-methods* t
-  "If true, most documentation for methods is assumed to be found in the docstring
-for their generic function. A generic function's methods are therefore described
-in a very brief format (bulleted list).
+  "If true, most documentation for methods is assumed to be found in the
+docstring for their generic function. A generic function's methods are
+therefore described in a very brief format (bulleted list).
 
 If false, each method receives its own section, just like other functions.")
 (defvar *class-diagram* nil
   "The author of the document. A string.")
 (defvar *document-email* "your@email.here"
   "The email address of the document's author. A string.")
+(defvar *document-style-sheet* nil
+  "Filename of the Cascading Style Sheet (.css) file to use if the
+document produced by CLOD is exported to HTML.")
 
 (deftype =entity= ()
   "The type 'entity' can have any of several different symbols as its value.
 
 
 (defmacro do-own-symbols ((var pkg) &body body)
-  "* Usage
-: (do-own-symbols (VAR PKG)
-:    ...body...)
-* Arguments
+  "* Arguments
 - VAR :: symbol naming a variable that will be bound to each symbol in turn.
 - PKG :: a package.
 * Description
          ,@body))))
 
 
+
+(defun ampersand-symbol? (sym)
+  "Does the symbol SYM begin with an ampersand, such as &ANY, &REST and
+so on?"
+  (and (symbolp sym)
+       (eql #\& (char (format nil "~A" sym) 0))))
+
+
+
 (defun entity->tag (entity)
-  "* Usage
-: (entity->tag ENTITY)
-* Arguments
+  "* Arguments
 - ENTITY :: An [[=entity=]].
 * Returns
 A string.
 
 
 (defun str+ (&rest strings)
-  "* Usage
-: (str+ STRING [STRING...])
-* Arguments
+  "* Arguments
 - STRINGS :: One or more strings.
 * Returns
 A string.
 
 
 (defun entity->string (entity)
-  "* Usage
-: (entity->string ENTITY)
-* Arguments
+  "* Arguments
 - ENTITY :: An [[=entity=]].
 * Returns
 A string.
     (otherwise (error "Unknown entity type: ~S" entity))))
 
 
+(defun map-list (function list)
+  "Map over proper and not proper lists."
+  (loop for (car . cdr) on list
+        collect (funcall function car) into result
+        when (null cdr) return result
+        when (atom cdr) return (nconc result (funcall function cdr))))
+
+
+
+(defun replace-strings-with-symbols (tree)
+  ;; From SLIME. For use with Lispworks arglist introspection.
+  (map-list
+   (lambda (x)
+     (typecase x
+       (list
+        (replace-strings-with-symbols x))
+       (symbol
+        x)
+       (string
+        (intern x))
+       (t
+        (intern (write-to-string x)))))
+   tree))
+
+
 (defun symbol-accessibility (sym &optional (pkg *package*))
-  "* Usage
-: (symbol-accessibility SYM [PKG])
-* Arguments
+  "* Arguments
 - SYM :: A symbol.
 - PKG :: A package.
 * Returns
 
 
 (defun list->string-with-commas (ls)
-  "* Usage
-: (list->string-with-commas LS)
-* Arguments
+  "* Arguments
 - LS :: A list of values.
 * Returns
 A string.
 
 
 (defun make-specialised-lambda-list (terms specs)
-  "* Usage
-: (make-specialised-lambda-list TERMS SPECS)
-* Arguments
+  "* Arguments
 - TERMS :: Unspecialised version of the lambda list (a list of symbols).
 - SPECS :: List of class names on which a particular method is
   specialised.
         (collect term))))
 
 
+;;; The following 2 functions are adapted from SLIME.
+
+
+(defun declared-special-p (symbol)
+  "Returns true if SYMBOL is declared special."
+  #+lispworks (sys:declared-special-p symbol)
+  #+sbcl (eql :special (sb-int:info :variable :kind symbol))
+  #+allegro (eq (sys:variable-information symbol) :special)
+  #+clozure (ccl:proclaimed-special-p symbol))
+
+
+
+(defun function-lambda-list (func)
+  "* Arguments
+- FUNC :: A function object, macro object, generic function object,
+  or a symbol bound to a function or macro.
+* Returns
+Two values:
+- The lambda list of the function name or function object, FUNC; or nil if
+  the function takes no arguments or the lambda list cannot be retrieved.
+- A boolean value -- T if a lambda list (even an empty one) was found,
+  NIL otherwise.
+* Description
+Returns the lambda list associated with the definition of the function or
+macro =FUNC=. For example, the lambda list for the common lisp function
+=FIND= is the list:
+: (ITEM SEQUENCE &KEY :FROM-END :TEST :TEST-NOT :START :END :KEY)
+"
+  (cond
+    ((and (not (functionp func))
+          (not (fboundp func)))
+     (error "Not a function: ~S" func))
+    ((and (functionp func)
+          (typep func (find-class 'generic-function)))
+     (values (generic-function-lambda-list func) t))
+    ((and (fboundp func)
+          (typep (symbol-function func) (find-class 'generic-function)))
+     (values (generic-function-lambda-list (symbol-function func)) t))
+    (t
+     #+sbcl
+     (let ((llist (sb-introspect:function-lambda-list func)))
+       (if llist
+           (values llist t)
+           (values nil nil)))
+     #+allegro
+     (handler-case (values (excl:arglist func) t)
+       (simple-error () (values nil nil)))
+     #+lispworks
+     (let ((arglist (lw:function-lambda-list func)))
+       (etypecase arglist
+         ((member :dont-know) 
+          (values nil nil))
+         (list
+          (values (replace-strings-with-symbols arglist)) t)))
+     #+clozure
+     (multiple-value-bind (arglist binding) (let ((*break-on-signals* nil))
+                                              (ccl:arglist func))
+       (if binding
+           (values arglist t)
+           (values nil nil)))
+     #+armedbear
+     (cond ((symbolp func)
+            (multiple-value-bind (arglist present) 
+                (sys::arglist func)
+              (when (and (not present)
+                         (fboundp func)
+                         (typep (symbol-function func)
+                                'standard-generic-function))
+                (setq arglist
+                      (mop::generic-function-lambda-list
+                       (symbol-function func))
+                      present
+                      t))
+              (if present
+                  (values arglist t)
+                  (values nil nil))))
+           (t (values nil nil)))
+     #+ecl
+     (when (or (functionp func) (fboundp func))
+       (multiple-value-bind (name fndef)
+           (if (functionp func)
+               (values (function-name func) func)
+               (values func (fdefinition func)))
+         (typecase fndef
+           (function
+            (let ((fle (function-lambda-expression fndef)))
+              (case (car fle)
+                (si:lambda-block
+                 (values (caddr fle) t))
+                (t
+                 (values nil nil))))))))
+     #+cmu
+     (let ((llist
+            (etypecase func
+              (function (cmucl-function-arglist fun))
+              (symbol (cmucl-function-arglist (or (macro-function func)
+                                                  (symbol-function func)))))))
+       (if (eql llist :not-available)
+           (values nil nil)
+           (values llist t)))
+     #+clisp
+     (block nil
+       (or (ignore-errors
+             (let ((exp (function-lambda-expression fname)))
+               (and exp (return (values (second exp) t)))))
+           (ignore-errors
+             (return (values (ext:arglist fname) t)))
+           (values nil nil))))))
+
+
+
+(defun function-name (fn)
+  "* Arguments
+- FN :: A function, generic function or macro object.
+* Returns
+The name of a function or macro, or nil.
+* Description
+Returns the official 'name' bound to the function, macro,
+or generic function object FN. Returns =NIL= if no name can
+be found or if the function is anonymous (=lambda=)."
+  (multiple-value-bind (lexp closure-p name)
+      (function-lambda-expression fn)
+    (declare (ignorable closure-p lexp))
+    (or name
+        #+allegro
+        (nth-value 2 lexp)
+        #+lispworks
+        (nth-value 2 lexp)
+        #+armedbear
+        (nth-value 2 lexp)
+        #+clozure
+        (ccl:function-name fn)
+        #+clisp nil
+        #+sbcl
+        (sb-impl::%fun-name fn)
+        #+cmu
+        (cond
+          ((eval:interpreted-function-p fn)
+           (eval:interpreted-function-name fn))
+          ((pcl::generic-function-p fn)
+           (pcl::generic-function-name fn))
+          ((c::byte-function-or-closure-p fn)
+           (c::byte-function-name fn))
+          (t (kernel:%function-name (kernel:%function-self fn))))
+        #+ecl
+        (typecase fn
+          (generic-function (clos:generic-function-name fn))
+          (function (si:compiled-function-name fn)))
+        )))
+
+
+
+
+#+cmu
+(defun cmucl-function-arglist (fun)
+  (let ((arglist
+         (cond ((eval:interpreted-function-p fun)
+                (eval:interpreted-function-arglist fun))
+               ((pcl::generic-function-p fun)
+                (pcl:generic-function-lambda-list fun))
+               ((c::byte-function-or-closure-p fun)
+                (cmucl-byte-code-function-arglist fun))
+               ((kernel:%function-arglist (kernel:%function-self fun))
+                (handler-case (cmucl-read-arglist fun)
+                  (error () :not-available)))
+               ;; this should work both for compiled-debug-function
+               ;; and for interpreted-debug-function
+               (t 
+                (handler-case (debug-function-arglist 
+                               (di::function-debug-function fun))
+                  (di:unhandled-condition () :not-available))))))
+    (check-type arglist (or list (member :not-available)))
+    arglist))
+
+
+#+cmu
+(defun cmucl-read-arglist (fn)
+  "Parse the arglist-string of the function object FN."
+  (let ((string (kernel:%function-arglist 
+                 (kernel:%function-self fn)))
+        (package (find-package
+                  (c::compiled-debug-info-package
+                   (kernel:%code-debug-info
+                    (vm::find-code-object fn))))))
+    (with-standard-io-syntax
+      (let ((*package* (or package *package*)))
+        (read-from-string string)))))
+
+
+#+cmu
+(defun cmucl-byte-code-function-arglist (fn)
+  ;; There doesn't seem to be much arglist information around for
+  ;; byte-code functions.  Use the arg-count and return something like
+  ;; (arg0 arg1 ...)
+  (etypecase fn
+    (c::simple-byte-function 
+     (loop for i from 0 below (c::simple-byte-function-num-args fn)
+           collect (cmucl-make-arg-symbol i)))
+    (c::hairy-byte-function 
+     (cmucl-hairy-byte-function-arglist fn))
+    (c::byte-closure
+     (cmucl-byte-code-function-arglist (c::byte-closure-function fn)))))
+
+
+#+cmu
+(defun cmucl-make-arg-symbol (i)
+  (make-symbol (format nil "~A~D" (string 'arg) i)))
+
+
+#+cmu
+(defun cmucl-hairy-byte-function-arglist (fn)
+  (let ((counter -1))
+    (flet ((next-arg () (cmucl-make-arg-symbol (incf counter))))
+      (with-struct (c::hairy-byte-function- min-args max-args rest-arg-p
+                                            keywords-p keywords) fn
+        (let ((arglist '())
+              (optional (- max-args min-args)))
+          (dotimes (i min-args)
+            (push (next-arg) arglist))
+          (when (plusp optional)
+            (push '&optional arglist)
+            (dotimes (i optional)
+              (push (next-arg) arglist)))
+          (when rest-arg-p
+            (push '&rest arglist)
+            (push (next-arg) arglist))
+          (when keywords-p
+            (push '&key arglist)
+            (loop for (key _ __) in keywords
+                  do (push key arglist))
+            (when (eq keywords-p :allow-others)
+              (push '&allow-other-keys arglist)))
+          (nreverse arglist))))))
+
+
+
+
 (defun list-all-direct-slots (classes)
-  "* Usage
-: (list-all-direct-slots CLASSES)
-* Arguments
+  "* Arguments
 - CLASSES :: A list of class objects.
 * Return Value
 A list of SLOT-DEFINITION instances.
 
 
 (defun list-all-indirect-slots (classes)
-  "* Usage
-: (list-all-indirect-slots CLASSES)
-* Arguments
+  "* Arguments
 - CLASSES :: A list of class objects.
 * Return Value
 A list of SLOT-DEFINITION instances.
 
 
 (defun list-all-slot-accessors (classes)
-  "* Usage
-: (list-all-slot-accessors CLASSES)
-* Arguments
+  "* Arguments
 - CLASSES :: A list of class objects.
 * Return Value
 A list of generic functions.
 
 
 (defun uses-for-symbol (sym)
-  "* Usage
-: (uses-for-symbol SYM)
-* Arguments
+  "* Arguments
 - SYM :: A symbol.
 * Return Value
 A list of [[=entity=]] values.
 
 
 (defun simple-type? (sym)
-  "* Usage
-: (simple-type? SYM)
-* Arguments
+  "* Arguments
 - SYM :: A symbol.
 * Return Value
 Boolean.
 
 (defun word-wrap (text &key (width 80) respect-newlines respect-hyphens
 		  exclude-start-char exclude-end-char)
-  "* Usage
-: (word-wrap TEXT &key WIDTH RESPECT-NEWLINES RESPECT-HYPHENS
-:    EXCLUDE-START-CHAR EXCLUDE-END-CHAR)
-* Arguments
+  "* Arguments
 - TEXT :: A string.
 - WIDTH :: An integer. The maximum length of lines once TEXT is wrapped.
-Default is 80.
+  Default is 80.
 - RESPECT-NEWLINES :: Boolean. Should newline characters within the string
-be treated as unbreakable? (=NIL=)
+  be treated as unbreakable? (=NIL=)
 - RESPECT-HYPHENS :: Boolean. Should we refrain from breaking hyphenated
-words? (=NIL=)
+  words? (=NIL=)
 - EXCLUDE-START-CHAR :: A character, or nil.
 - EXCLUDE-END-CHAR :: A character, or nil.
 
 
 (eval-when (:compile-toplevel :load-toplevel :execute)
   (defun org-safe-symbol (sym)
-    "* Usage
-: (org-safe-symbol SYM)
-* Arguments
+    "* Arguments
 - SYM :: A symbol.
 * Return Value
 A string.
     
 
 (defun html-safe-string (str)
-  "Usage
-: (html-safe-string STR)
-* Arguments
+  "* Arguments
 - STR :: A string.
 * Returns
 A string.
 
 
 (defun write-preamble ()
-  "* Usage
-: (write-preamble)
-* Arguments
+  "* Arguments
 None.
 * Return Value
 Ignored.
   (write-out "~&#+LINK: hs ~A/%s" (if (eql 0 (search "http:" *hyperspec-root*))
                                       *hyperspec-root*
                                       (format nil "file:~A" *hyperspec-root*)))
+  (if *document-style-sheet*
+      (write-out
+       "~&#+STYLE: <link rel=\"stylesheet\" type=\"text/css\" href=~S />"
+       *document-style-sheet*))
   (write-out "~&#+STARTUP: showall")
   ;; H:NNN = below this many levels deep, headings become bulleted lists
   ;; toc:NNN = go this many levels deep in table of contents
 
 
 (defmacro writing-section ((title) &body body)
+  "Wraps all output within the body of the form in its own section."
   `(let* ((*heading-level* (1+ *heading-level*))
           (%title ,title))
      (write-heading (format nil "~:(~A~)" %title))
 
 
 (defmacro writing-section-for-symbol ((entity sym) &body body)
+  "Wraps all output within the body of the form in its own section. The
+title of the section describes the entity of type =ENTITY= that is
+bound to the symbol =SYM=."
   `(let* ((*heading-level* (1+ *heading-level*))
           (%entity ,entity)
           (%sym ,sym)
 
 
 (defun write-chapter (symlist entity title)
-  "* Usage
-: (write-chapter SYMLIST ENTITY TITLE)
-* Arguments
+  "* Arguments
 - SYMLIST :: A list of symbols.
 - ENTITY :: An [[=entity=]].
 - TITLE :: A string.
 
 (defun write-docstring (str &key (levels *heading-level*)
                         (default "Not documented."))
-  "* Usage
-: (write-docstring STR &key LEVELS DEFAULT)
-* Arguments
+  "* Arguments
 - STR :: A docstring.
 - LEVELS :: How many levels deep in the outline is
   this docstring?
 
 
 (defmacro write-indented ((indent) &body body)
-  "* Usage
-: (write-indented (INDENT)
-:    ...body...)
-* Arguments
+  "* Arguments
 - INDENT :: An integer.
 * Return Value
 Ignored.
 
 
 (defun wrap-and-write (fmt &rest args)
+  "Wraps the result of =(FORMAT NIL FMT . ARGS)=, then writes the
+resulting paragraph to output."
   (let ((lines (word-wrap (apply #'format nil fmt args) :width *line-width*)))
     (dolist (line lines)
       (write-out line))
 
 
 (defun wrap-and-write-code (fmt &rest args)
+  "Wraps the result of =(FORMAT NIL FMT . ARGS)=, then writes the
+resulting paragraph with 'literal' or 'source code block' markup."
   (let ((lines (word-wrap (apply #'format nil fmt args)
                           :width (- *line-width* 2))))
     (dolist (line lines)
 
 
 (defun write-out (fmt &rest args)
+  "Writes the result of =(FORMAT NIL FMT . ARGS)= to output."
   (fresh-line *out*)
   (princ (make-string *left-margin* :initial-element #\space) *out*)
   (apply #'format *out* fmt args))
 
 
 (defun write-heading (title)
+  "Writes a section heading entitled =TITLE=."
   (format *out* "~&~%~A ~A~%~%"
            (make-string *heading-level* :initial-element *heading-char*)
            title))
 
 
 (defun type->string (typ)
+  "Returns a simple string representation of the type specifier =TYP=."
   (format nil "~A"
           (cond
             ((listp typ)
 
 
 (defun make-class-link (x &key text)
+  "Synonym for ([[make-link]] =X :class=)."
   (make-link x :class :text text))
 
 
 (defun make-package-link (sym)
+  "Synonym for ([[make-link]] =X :package=)."
   (make-link sym :package))
 
 
 (defun write-list-as-paragraph (ls)
+  "LS is a list of items. Writes all the items in LS to output as a
+single wrapped paragraph. Individual items are separated by commas."
   (wrap-and-write (list->string-with-commas ls)))
 
 
     
 
 (defun write-docstring-section (title docstr)
+  "Writes the documentation string DOCSTR within its own subsection."
   (if (and (stringp docstr)
            (eql 0 (search (format nil "~C " *heading-char*) docstr)))
       (let ((*heading-level* (1+ *heading-level*)))
 
 
 (defun make-target (sym &optional entity)
+  "Returns a string that will be interpreted by org as a destination for
+hyperlinks to =SYM=."
   (let ((target-start (if *auto-links* "<<<" "<<"))
         (target-end (if *auto-links* ">>>" ">>"))
         (sym (string sym)))
 
 
 (defmacro writing-bulleted-list (&body body)
+  "All output within the body of a form is assumed to be within a
+bulleted list."
   `(progn
      ,@body
      (terpri *out*)))
 
 
 (defun write-bullet-point (fmt &rest args)
-  ;; (concatenate 'string "~&- " fmt "~&")
+  "Writes a the result of =(FORMAT NIL FMT . ARGS)= as a point within
+an active bulleted list."
   (let* ((str (apply #'format nil fmt args))
          (lines (word-wrap str :width (- *line-width* 2))))
     (write-out "~&- ~A~%" (car lines))
 
 
 (defun write-index (pkg &optional (accessibilities (list :internal :external)))
+  "Writes a section containing an alphabetical index of all the symbols
+in the package PKG."
   (let ((symbols nil)
         (index-table (make-hash-table :test 'eql)))
     (do-own-symbols (sym pkg)
 
 
 (defun write-disambiguation (sym uses)
+  "Writes a section providing disambiguating links for the symbol
+SYM, which is bound in multiple namespaces."
   (writing-section (sym)
     (write-out "# target: ~A~%" (make-target (string sym)))
     (write-out "Disambiguation.~%~%")
                              (make-link sym use)))))))
 
 
+(defun write-lambda-list-section (sym)
+  "Writes a section describing the lambda list of the function or macro SYM."
+  (writing-section ("Syntax")
+    (format *out* "~&#+BEGIN_SRC lisp~%")
+    (format *out* "(~(~A~)~{ ~A~})~%"
+            sym
+            (mapcar (lambda (term)
+                      (if (ampersand-symbol? term)
+                          (string-downcase (string term))
+                          term))
+                    (function-lambda-list sym)))
+    (format *out* "#+END_SRC~%")))
+
+
 
 ;;;; Document methods =========================================================
 
 (defmethod document :before ((sym symbol) (doctype t))
   (unless (or (not *lines-between-sections*)
               (eql doctype :method))
-    (format *out* "~&-----~%")))
+    (format *out* "~&-----~%~%")))
 
 
 (defmethod document ((sym symbol) (doctype (eql :function)))
     ;; because functions are pretty opaque. It is up to the user to
     ;; write everything in the docstring.
     (let ((*heading-level* (1+ *heading-level*)))
+      (write-lambda-list-section sym)
       (write-docstring (documentation sym 'function)))))
 
 
+  
 (defmethod document ((sym symbol) (doctype (eql :macro)))
   (writing-section-for-symbol (:macro sym)
     ;; The same goes for macros.
     (let ((*heading-level* (1+ *heading-level*)))
+      (write-lambda-list-section sym)
       (write-docstring (documentation sym 'function)))))
 
 
 (defmethod document ((sym symbol) (doctype (eql :generic)))
   (let ((gf (symbol-function sym)))
     (writing-section-for-symbol (:generic-function sym)
-      (writing-section ("Usage")
-        (format *out* "~((~A~{ ~A~})~)~%"
-                (org-safe-symbol sym)
-                (generic-function-lambda-list gf)))
+      (write-lambda-list-section sym)
       (write-docstring-section "Description" (documentation gf t))
       ;; No portable way for method-combination objects to introspect.
       ;;(format *out* "  Combination: ~S~%"
 (defmethod document ((sym symbol) (doctype (eql :slot-reader)))
   (let ((gf (symbol-function sym)))
     (writing-section-for-symbol (:slot-reader sym)
-      (writing-section ("Usage")
-        (format *out* "~((~A~{ ~A~})~)~%"
-                (org-safe-symbol sym)
-                (generic-function-lambda-list gf)))
+      (write-lambda-list-section sym)
       (when (documentation gf t)
         (write-docstring-section "Description" (documentation gf t)))
       (writing-section ("Methods")
 (defmethod document ((sym symbol) (doctype (eql :slot-writer)))
   (let ((gf (symbol-function sym)))
     (writing-section-for-symbol (:slot-writer sym)
-      (writing-section ("Usage")
-        (format *out* "~((~A~{ ~A~})~)~%"
-                (org-safe-symbol sym)
-                (generic-function-lambda-list gf)))
+      (write-lambda-list-section sym)
       (when (documentation gf t)
         (write-docstring-section "Description" (documentation gf t)))
       (writing-section ("Methods")
 (defmethod document ((sym symbol) (doctype (eql :slot-accessor)))
   (let ((gf (symbol-function sym)))
     (writing-section-for-symbol (:slot-accessor sym)
-      (writing-section ("Usage")
-        (format *out* "~((~A~{ ~A~})~)~%"
-                (org-safe-symbol sym)
-                (generic-function-lambda-list gf)))
+      (write-lambda-list-section sym)
       (when (documentation gf t)
         (write-docstring-section "Description" (documentation gf t)))
       (writing-section ("Methods")
           (document fname :slot-writer))))))
 
 
+;;;; Example classes ==========================================================
+
+;;; We create these purely to illustrate the class diagram
+;;; functionality.
+
+(defclass Animal () ()
+  (:documentation "dummy class, created to illustrate CLOD's ability
+to produce class diagrams using GraphViz."))
+(defclass Bird (Animal) ()
+  (:documentation "dummy class, created to illustrate CLOD's ability
+to produce class diagrams using GraphViz."))
+(defclass Mammal (Animal) ()
+  (:documentation "dummy class, created to illustrate CLOD's ability
+to produce class diagrams using GraphViz."))
+(defclass Cat (Mammal) ()
+  (:documentation "dummy class, created to illustrate CLOD's ability
+to produce class diagrams using GraphViz."))
+(defclass Dog (Mammal) ()
+  (:documentation "dummy class, created to illustrate CLOD's ability
+to produce class diagrams using GraphViz."))
+(defclass Hawk (Bird) ()
+  (:documentation "dummy class, created to illustrate CLOD's ability
+to produce class diagrams using GraphViz."))
 
 ;;;; Toplevel =================================================================
 
 
 (defun document-package-contents (pkg &optional (accessibilities
                                                  (list :external :internal)))
-  "* Usage
-: (document-package-contents PKG [ACCESSIBILITIES])
-* Arguments
+  "* Arguments
 - PKG :: A package name or package object.
 - ACCESSIBILITIES :: A list containing zero or more of the symbols
   =:external= or =:internal=.
 
 
 (defun accessible-symbols (syms access pkg)
-  "* Usage
-: (accessible-symbols SYMS ACCESS PKG)
-* Arguments
+  "* Arguments
 - SYMS :: A list of symbols.
 - ACCESS :: One of the keywords =:INTERNAL= or =:EXTERNAL=.
 - PKG :: A package object.
                  syms))
 
 
+(defun write-lines (&rest lines)
+  (dolist (line lines)
+    (write-out line)))
+
+
 (defun write-class-hierarchy (classes)
-  "* Usage
-: (write-class-hierarchy CLASSES)
-* Arguments
+  "* Arguments
 - CLASSES :: A list of CLASS objects.
 * Returns
 Ignored.
 
 See http://www.graphviz.org/ for details of the GraphViz language."
   (let ((foreign-parents nil))
+    (write-lines
+     "# For this to work, you need to have graphviz installed, and the"
+     "# program `dot' must be in your PATH."
+     "# You also need to enable the optional module 'org-exp-blocks'"
+     "# in Emacs' org mode. For this you will need the following line in"
+     "# your .emacs file:"
+     "#"
+     "#   (require 'org-exp-blocks)"
+     "#"
+     "# If you have trouble getting graphviz to process this diagram,"
+     "# try saving the lines between #+begin_dot and #+end_dot to a plain"
+     "# text file. Then run the following at the command prompt:"
+     "#"
+     "#   dot -Tpng file.txt -o class_diagram.png"
+     "#"
+     "# Then paste a link like"
+     "# <img src=\"class_diagram.png\"  alt=\"Class diagram\"/>"
+     "# into the html file.")
     (write-out "~&#+begin_dot class.png -Tpng~%")
     (write-out "digraph data_relationships {~%")
     (write-out "   rankdir=\"LR\";~%")
                      (symbol-package (class-name c)))
           (push parent foreign-parents))))
     (dolist (fp foreign-parents)
-      (write-out "   \"~:(~A~)\" [shape=Mrecord,colour=lightblue,label=\"{~:(~A~)|~(~A~)}\"];~%"
+      (write-out "   \"~:(~A~)\" [shape=Mrecord,colour=lightblue,label=\"~:(~A~)|~(~A~)\"];~%"
                  (class-name fp) (class-name fp)
                  (package-name (symbol-package (class-name fp)))))
     (write-out "~&}~%")
                           (lines-between-sections t)
                           (brief-methods t)
                           (class-diagram nil)
+                          (style-sheet nil)
                           (title *document-title*)
                           (author *document-author*)
                           (email *document-email*))
-  "* Usage
-: (document-packages PACKAGES FILE/STREAM &key AUTO-LINKS
-:      LINES-BETWEEN-SECTIONS BRIEF-METHODS TITLE
-:      AUTHOR EMAIL)
-* Arguments
+  "* Arguments
 - PACKAGES :: A list of package objects, or symbols naming packages.
 - FILE/STREAM :: A string (filename), stream object, or =NIL=.
+Other arguments are the same as for [[document-package]].
 * Returns
 A string, or nil.
 * Description
 Produces documentation for all the packages in =PACKAGES=, within a
 single file.
+
 See [[document-package]] for more details."
   (let ((*auto-links* auto-links)
         (*lines-between-sections* lines-between-sections)
         (*brief-methods* brief-methods)
         (*class-diagram* class-diagram)
+        (*document-style-sheet* style-sheet)
         (*document-title* title)
         (*document-author* author)
         (*document-email* email))
                           (lines-between-sections t)
                           (brief-methods t)
                          (class-diagram nil)
+                         (style-sheet nil)
                          (title nil) (author *document-author*)
                          (email *document-email*))
-  "* Usage
-: (document-package PKG FILE/STREAM &key AUTO-LINKS
-:      LINES-BETWEEN-SECTIONS BRIEF-METHODS CLASS-DIAGRAM
-:      TITLE AUTHOR EMAIL)
-* Arguments
+  "* Arguments
 - PKG :: A package name or package object.
 - FILE/STREAM :: A string (filename), stream object, or =NIL=.
 - AUTO-LINKS :: Boolean.
 - LINES-BETWEEN-SECTIONS :: Boolean.
 - BRIEF-METHODS :: Boolean.
 - CLASS-DIAGRAM :: Boolean.
+- STYLE-SHEET :: A string.
 - TITLE :: A string.
 - AUTHOR :: A string.
 - EMAIL :: A string.
 Explanation of optional arguments:
 - =TITLE=, =AUTHOR= and =EMAIL= specify the document title, the name of
   the author, and the email address of the author.
+- =STYLE-SHEET= specifies the name of a Cascading Style Sheet (.CSS) file
+  which will be used as the style for the document if you export it
+  to HTML from org mode.
 - If =AUTO-LINKS= is non-nil, *all* occurrences of symbol names within the
   text of docstrings will be interpreted as hyperlinks, regardless of
   whether they are marked up as hyperlinks.
   description, containing a description of the package hierarchy
   in the form of a GraphViz 'dot' diagram (see http://www.graphviz.org/).
 
+* Example
+;;; (clod:document-package :mypkg \"mypkg-doc.org\"
+;;;      :style-sheet \"swiss.css\" :title \"My Package\"
+;;;      :author \"F. B. Quux\" :email \"quux@gmail.com\")
+
 * See also
 - [[document-packages]]"
   (unless (packagep pkg)
                      :lines-between-sections lines-between-sections
                      :brief-methods brief-methods
                      :class-diagram class-diagram
+                     :style-sheet style-sheet
                      :title title :author author :email email))
   
 

File doc/clod-doc.html

 <title>CLOD</title>
 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>
 <meta name="generator" content="Org-mode"/>
-<meta name="generated" content="2010-02-27 00:36:10 NZDT"/>
+<meta name="generated" content="2010-03-01 20:13:13 NZDT"/>
 <meta name="author" content="Paul Sexton"/>
 <meta name="description" content=""/>
 <meta name="keywords" content=""/>
 
 <h1 class="title">CLOD</h1>
 
-<p><a name="clod" id="clod"></a>
-<a name="package==clod" id="package==clod"></a>
-</p>
-
 
 <div id="table-of-contents">
 <h2>Table of Contents</h2>
 <ul>
 <li><a href="#sec-1">1 Internal Package: <code>clod</code></a>
 <ul>
-<li>
-<ul>
 <li><a href="#sec-1.1">1.1 Description</a></li>
 <li><a href="#sec-1.2">1.2 Why use CLOD?</a></li>
 <li><a href="#sec-1.3">1.3 Dependencies</a></li>
 <li><a href="#sec-1.4">1.4 How to use</a></li>
 <li><a href="#sec-1.5">1.5 Writing the documentation</a></li>
 <li><a href="#sec-1.6">1.6 Example</a></li>
-<li><a href="#sec-1.7">1.7 Limitations</a></li>
-</ul>
-</li>
-<li><a href="#sec-1.1">1.1 External Symbols</a>
+<li><a href="#sec-1.7">1.7 Class Hierarchy</a></li>
+<li><a href="#sec-1.8">1.8 External Symbols</a>
 <ul>
-<li><a href="#sec-1.1.1">1.1.1 External Functions</a>
+<li><a href="#sec-1.8.1">1.8.1 External Functions</a>
 <ul>
-<li><a href="#sec-1.1.1.1">1.1.1.1 External Function: <code>document-package</code></a></li>
-<li><a href="#sec-1.1.1.2">1.1.1.2 External Function: <code>document-packages</code></a></li>
+<li><a href="#sec-1.8.1.1">1.8.1.1 External Function: <code>document-package</code></a></li>
+<li><a href="#sec-1.8.1.2">1.8.1.2 External Function: <code>document-packages</code></a></li>
 </ul></li>
 </ul>
 </li>
-<li><a href="#sec-1.2">1.2 Internal Symbols</a>
+<li><a href="#sec-1.9">1.9 Internal Symbols</a>
 <ul>
-<li><a href="#sec-1.2.1">1.2.1 Internal Types</a>
+<li><a href="#sec-1.9.1">1.9.1 Internal Classes</a>
 <ul>
-<li><a href="#sec-1.2.1.1">1.2.1.1 Internal Type: ==entity==</a></li>
+<li><a href="#sec-1.9.1.1">1.9.1.1 Internal Class: <code>animal</code></a></li>
+<li><a href="#sec-1.9.1.2">1.9.1.2 Internal Class: <code>bird</code></a></li>
+<li><a href="#sec-1.9.1.3">1.9.1.3 Internal Class: <code>cat</code></a></li>
+<li><a href="#sec-1.9.1.4">1.9.1.4 Internal Class: <code>dog</code></a></li>
+<li><a href="#sec-1.9.1.5">1.9.1.5 Internal Class: <code>hawk</code></a></li>
+<li><a href="#sec-1.9.1.6">1.9.1.6 Internal Class: <code>mammal</code></a></li>
 </ul>
 </li>
-<li><a href="#sec-1.2.2">1.2.2 Internal Global Variables</a>
+<li><a href="#sec-1.9.2">1.9.2 Internal Types</a>
 <ul>
-<li><a href="#sec-1.2.2.1">1.2.2.1 Internal Variable: <code>*alphabet*</code></a></li>
-<li><a href="#sec-1.2.2.2">1.2.2.2 Internal Variable: <code>*ambiguities*</code></a></li>
-<li><a href="#sec-1.2.2.3">1.2.2.3 Internal Variable: <code>*auto-links*</code></a></li>
-<li><a href="#sec-1.2.2.4">1.2.2.4 Internal Variable: <code>*brief-methods*</code></a></li>
-<li><a href="#sec-1.2.2.5">1.2.2.5 Internal Variable: <code>*class-diagram*</code></a></li>
-<li><a href="#sec-1.2.2.6">1.2.2.6 Internal Variable: <code>*document-author*</code></a></li>
-<li><a href="#sec-1.2.2.7">1.2.2.7 Internal Variable: <code>*document-email*</code></a></li>
-<li><a href="#sec-1.2.2.8">1.2.2.8 Internal Variable: <code>*document-title*</code></a></li>
-<li><a href="#sec-1.2.2.9">1.2.2.9 Internal Variable: <code>*heading-char*</code></a></li>
-<li><a href="#sec-1.2.2.10">1.2.2.10 Internal Variable: <code>*heading-level*</code></a></li>
-<li><a href="#sec-1.2.2.11">1.2.2.11 Internal Variable: <code>*hyperspec-root*</code></a></li>
-<li><a href="#sec-1.2.2.12">1.2.2.12 Internal Variable: <code>*left-margin*</code></a></li>
-<li><a href="#sec-1.2.2.13">1.2.2.13 Internal Variable: <code>*line-width*</code></a></li>
-<li><a href="#sec-1.2.2.14">1.2.2.14 Internal Variable: <code>*lines-between-sections*</code></a></li>
-<li><a href="#sec-1.2.2.15">1.2.2.15 Internal Variable: <code>*out*</code></a></li>
-<li><a href="#sec-1.2.2.16">1.2.2.16 Internal Variable: <code>*unsafe-html-chars*</code></a></li>
+<li><a href="#sec-1.9.2.1">1.9.2.1 Internal Type: ==entity==</a></li>
 </ul>
 </li>
-<li><a href="#sec-1.2.3">1.2.3 Internal Macros</a>
+<li><a href="#sec-1.9.3">1.9.3 Internal Global Variables</a>
 <ul>
-<li><a href="#sec-1.2.3.1">1.2.3.1 Internal Macro: <code>do-own-symbols</code></a></li>
-<li><a href="#sec-1.2.3.2">1.2.3.2 Internal Macro: <code>write-indented</code></a></li>
-<li><a href="#sec-1.2.3.3">1.2.3.3 Internal Macro: <code>writing-bulleted-list</code></a></li>
-<li><a href="#sec-1.2.3.4">1.2.3.4 Internal Macro: <code>writing-section</code></a></li>
-<li><a href="#sec-1.2.3.5">1.2.3.5 Internal Macro: <code>writing-section-for-symbol</code></a></li>
+<li><a href="#sec-1.9.3.1">1.9.3.1 Internal Variable: <code>*alphabet*</code></a></li>
+<li><a href="#sec-1.9.3.2">1.9.3.2 Internal Variable: <code>*ambiguities*</code></a></li>
+<li><a href="#sec-1.9.3.3">1.9.3.3 Internal Variable: <code>*auto-links*</code></a></li>
+<li><a href="#sec-1.9.3.4">1.9.3.4 Internal Variable: <code>*brief-methods*</code></a></li>
+<li><a href="#sec-1.9.3.5">1.9.3.5 Internal Variable: <code>*class-diagram*</code></a></li>
+<li><a href="#sec-1.9.3.6">1.9.3.6 Internal Variable: <code>*document-author*</code></a></li>
+<li><a href="#sec-1.9.3.7">1.9.3.7 Internal Variable: <code>*document-email*</code></a></li>
+<li><a href="#sec-1.9.3.8">1.9.3.8 Internal Variable: <code>*document-style-sheet*</code></a></li>
+<li><a href="#sec-1.9.3.9">1.9.3.9 Internal Variable: <code>*document-title*</code></a></li>
+<li><a href="#sec-1.9.3.10">1.9.3.10 Internal Variable: <code>*heading-char*</code></a></li>
+<li><a href="#sec-1.9.3.11">1.9.3.11 Internal Variable: <code>*heading-level*</code></a></li>
+<li><a href="#sec-1.9.3.12">1.9.3.12 Internal Variable: <code>*hyperspec-root*</code></a></li>
+<li><a href="#sec-1.9.3.13">1.9.3.13 Internal Variable: <code>*left-margin*</code></a></li>
+<li><a href="#sec-1.9.3.14">1.9.3.14 Internal Variable: <code>*line-width*</code></a></li>
+<li><a href="#sec-1.9.3.15">1.9.3.15 Internal Variable: <code>*lines-between-sections*</code></a></li>
+<li><a href="#sec-1.9.3.16">1.9.3.16 Internal Variable: <code>*out*</code></a></li>
+<li><a href="#sec-1.9.3.17">1.9.3.17 Internal Variable: <code>*unsafe-html-chars*</code></a></li>
 </ul>
 </li>
-<li><a href="#sec-1.2.4">1.2.4 Internal Functions</a>
+<li><a href="#sec-1.9.4">1.9.4 Internal Macros</a>
 <ul>
-<li><a href="#sec-1.2.4.1">1.2.4.1 Internal Function: <code>accessible-symbols</code></a></li>
-<li><a href="#sec-1.2.4.2">1.2.4.2 Internal Function: <code>docpkg</code></a></li>
-<li><a href="#sec-1.2.4.3">1.2.4.3 Internal Function: <code>document-package-contents</code></a></li>
-<li><a href="#sec-1.2.4.4">1.2.4.4 Internal Function: <code>entity-&gt;string</code></a></li>
-<li><a href="#sec-1.2.4.5">1.2.4.5 Internal Function: <code>entity-&gt;tag</code></a></li>
-<li><a href="#sec-1.2.4.6">1.2.4.6 Internal Function: <code>html-safe-string</code></a></li>
-<li><a href="#sec-1.2.4.7">1.2.4.7 Internal Function: <code>list-&gt;string-with-commas</code></a></li>
-<li><a href="#sec-1.2.4.8">1.2.4.8 Internal Function: <code>list-all-direct-slots</code></a></li>
-<li><a href="#sec-1.2.4.9">1.2.4.9 Internal Function: <code>list-all-indirect-slots</code></a></li>
-<li><a href="#sec-1.2.4.10">1.2.4.10 Internal Function: <code>list-all-slot-accessors</code></a></li>
-<li><a href="#sec-1.2.4.11">1.2.4.11 Internal Function: <code>make-class-link</code></a></li>
-<li><a href="#sec-1.2.4.12">1.2.4.12 Internal Function: <code>make-package-link</code></a></li>
-<li><a href="#sec-1.2.4.13">1.2.4.13 Internal Function: <code>make-specialised-lambda-list</code></a></li>
-<li><a href="#sec-1.2.4.14">1.2.4.14 Internal Function: <code>make-target</code></a></li>
-<li><a href="#sec-1.2.4.15">1.2.4.15 Internal Function: <code>org-safe-symbol</code></a></li>
-<li><a href="#sec-1.2.4.16">1.2.4.16 Internal Function: <code>simple-type?</code></a></li>
-<li><a href="#sec-1.2.4.17">1.2.4.17 Internal Function: <code>str+</code></a></li>
-<li><a href="#sec-1.2.4.18">1.2.4.18 Internal Function: <code>symbol-accessibility</code></a></li>
-<li><a href="#sec-1.2.4.19">1.2.4.19 Internal Function: <code>type-&gt;string</code></a></li>
-<li><a href="#sec-1.2.4.20">1.2.4.20 Internal Function: <code>uses-for-symbol</code></a></li>
-<li><a href="#sec-1.2.4.21">1.2.4.21 Internal Function: <code>word-wrap</code></a></li>
-<li><a href="#sec-1.2.4.22">1.2.4.22 Internal Function: <code>wrap-and-write</code></a></li>
-<li><a href="#sec-1.2.4.23">1.2.4.23 Internal Function: <code>wrap-and-write-code</code></a></li>
-<li><a href="#sec-1.2.4.24">1.2.4.24 Internal Function: <code>write-bullet-point</code></a></li>
-<li><a href="#sec-1.2.4.25">1.2.4.25 Internal Function: <code>write-chapter</code></a></li>
-<li><a href="#sec-1.2.4.26">1.2.4.26 Internal Function: <code>write-class-hierarchy</code></a></li>
-<li><a href="#sec-1.2.4.27">1.2.4.27 Internal Function: <code>write-disambiguation</code></a></li>
-<li><a href="#sec-1.2.4.28">1.2.4.28 Internal Function: <code>write-docstring</code></a></li>
-<li><a href="#sec-1.2.4.29">1.2.4.29 Internal Function: <code>write-docstring-section</code></a></li>
-<li><a href="#sec-1.2.4.30">1.2.4.30 Internal Function: <code>write-heading</code></a></li>
-<li><a href="#sec-1.2.4.31">1.2.4.31 Internal Function: <code>write-index</code></a></li>
-<li><a href="#sec-1.2.4.32">1.2.4.32 Internal Function: <code>write-list-as-paragraph</code></a></li>
-<li><a href="#sec-1.2.4.33">1.2.4.33 Internal Function: <code>write-out</code></a></li>
-<li><a href="#sec-1.2.4.34">1.2.4.34 Internal Function: <code>write-preamble</code></a></li>
+<li><a href="#sec-1.9.4.1">1.9.4.1 Internal Macro: <code>do-own-symbols</code></a></li>
+<li><a href="#sec-1.9.4.2">1.9.4.2 Internal Macro: <code>write-indented</code></a></li>
+<li><a href="#sec-1.9.4.3">1.9.4.3 Internal Macro: <code>writing-bulleted-list</code></a></li>
+<li><a href="#sec-1.9.4.4">1.9.4.4 Internal Macro: <code>writing-section</code></a></li>
+<li><a href="#sec-1.9.4.5">1.9.4.5 Internal Macro: <code>writing-section-for-symbol</code></a></li>
 </ul>
 </li>
-<li><a href="#sec-1.2.5">1.2.5 Internal Generic Functions</a>
+<li><a href="#sec-1.9.5">1.9.5 Internal Functions</a>
 <ul>
-<li><a href="#sec-1.2.5.1">1.2.5.1 Internal Generic Function: <code>document</code></a></li>
-<li><a href="#sec-1.2.5.2">1.2.5.2 Internal Generic Function: <code>make-link</code></a></li>
+<li><a href="#sec-1.9.5.1">1.9.5.1 Internal Function: <code>accessible-symbols</code></a></li>
+<li><a href="#sec-1.9.5.2">1.9.5.2 Internal Function: <code>ampersand-symbol?</code></a></li>
+<li><a href="#sec-1.9.5.3">1.9.5.3 Internal Function: <code>declared-special-p</code></a></li>
+<li><a href="#sec-1.9.5.4">1.9.5.4 Internal Function: <code>docpkg</code></a></li>
+<li><a href="#sec-1.9.5.5">1.9.5.5 Internal Function: <code>document-package-contents</code></a></li>
+<li><a href="#sec-1.9.5.6">1.9.5.6 Internal Function: <code>entity-&gt;string</code></a></li>
+<li><a href="#sec-1.9.5.7">1.9.5.7 Internal Function: <code>entity-&gt;tag</code></a></li>
+<li><a href="#sec-1.9.5.8">1.9.5.8 Internal Function: <code>function-lambda-list</code></a></li>
+<li><a href="#sec-1.9.5.9">1.9.5.9 Internal Function: <code>function-name</code></a></li>
+<li><a href="#sec-1.9.5.10">1.9.5.10 Internal Function: <code>html-safe-string</code></a></li>
+<li><a href="#sec-1.9.5.11">1.9.5.11 Internal Function: <code>list-&gt;string-with-commas</code></a></li>
+<li><a href="#sec-1.9.5.12">1.9.5.12 Internal Function: <code>list-all-direct-slots</code></a></li>
+<li><a href="#sec-1.9.5.13">1.9.5.13 Internal Function: <code>list-all-indirect-slots</code></a></li>
+<li><a href="#sec-1.9.5.14">1.9.5.14 Internal Function: <code>list-all-slot-accessors</code></a></li>
+<li><a href="#sec-1.9.5.15">1.9.5.15 Internal Function: <code>make-class-link</code></a></li>
+<li><a href="#sec-1.9.5.16">1.9.5.16 Internal Function: <code>make-package-link</code></a></li>
+<li><a href="#sec-1.9.5.17">1.9.5.17 Internal Function: <code>make-specialised-lambda-list</code></a></li>
+<li><a href="#sec-1.9.5.18">1.9.5.18 Internal Function: <code>make-target</code></a></li>
+<li><a href="#sec-1.9.5.19">1.9.5.19 Internal Function: <code>map-list</code></a></li>
+<li><a href="#sec-1.9.5.20">1.9.5.20 Internal Function: <code>org-safe-symbol</code></a></li>
+<li><a href="#sec-1.9.5.21">1.9.5.21 Internal Function: <code>replace-strings-with-symbols</code></a></li>
+<li><a href="#sec-1.9.5.22">1.9.5.22 Internal Function: <code>simple-type?</code></a></li>
+<li><a href="#sec-1.9.5.23">1.9.5.23 Internal Function: <code>str+</code></a></li>
+<li><a href="#sec-1.9.5.24">1.9.5.24 Internal Function: <code>symbol-accessibility</code></a></li>
+<li><a href="#sec-1.9.5.25">1.9.5.25 Internal Function: <code>type-&gt;string</code></a></li>
+<li><a href="#sec-1.9.5.26">1.9.5.26 Internal Function: <code>uses-for-symbol</code></a></li>
+<li><a href="#sec-1.9.5.27">1.9.5.27 Internal Function: <code>word-wrap</code></a></li>
+<li><a href="#sec-1.9.5.28">1.9.5.28 Internal Function: <code>wrap-and-write</code></a></li>
+<li><a href="#sec-1.9.5.29">1.9.5.29 Internal Function: <code>wrap-and-write-code</code></a></li>
+<li><a href="#sec-1.9.5.30">1.9.5.30 Internal Function: <code>write-bullet-point</code></a></li>
+<li><a href="#sec-1.9.5.31">1.9.5.31 Internal Function: <code>write-chapter</code></a></li>
+<li><a href="#sec-1.9.5.32">1.9.5.32 Internal Function: <code>write-class-hierarchy</code></a></li>
+<li><a href="#sec-1.9.5.33">1.9.5.33 Internal Function: <code>write-disambiguation</code></a></li>
+<li><a href="#sec-1.9.5.34">1.9.5.34 Internal Function: <code>write-docstring</code></a></li>
+<li><a href="#sec-1.9.5.35">1.9.5.35 Internal Function: <code>write-docstring-section</code></a></li>
+<li><a href="#sec-1.9.5.36">1.9.5.36 Internal Function: <code>write-heading</code></a></li>
+<li><a href="#sec-1.9.5.37">1.9.5.37 Internal Function: <code>write-index</code></a></li>
+<li><a href="#sec-1.9.5.38">1.9.5.38 Internal Function: <code>write-lambda-list-section</code></a></li>
+<li><a href="#sec-1.9.5.39">1.9.5.39 Internal Function: <code>write-lines</code></a></li>
+<li><a href="#sec-1.9.5.40">1.9.5.40 Internal Function: <code>write-list-as-paragraph</code></a></li>
+<li><a href="#sec-1.9.5.41">1.9.5.41 Internal Function: <code>write-out</code></a></li>
+<li><a href="#sec-1.9.5.42">1.9.5.42 Internal Function: <code>write-preamble</code></a></li>
+</ul>
+</li>
+<li><a href="#sec-1.9.6">1.9.6 Internal Generic Functions</a>
+<ul>
+<li><a href="#sec-1.9.6.1">1.9.6.1 Internal Generic Function: <code>document</code></a></li>
+<li><a href="#sec-1.9.6.2">1.9.6.2 Internal Generic Function: <code>make-link</code></a></li>
 </ul></li>
 </ul>
 </li>
-<li><a href="#sec-1.3">1.3 Index</a>
+<li><a href="#sec-1.10">1.10 Index</a>
 <ul>
-<li><a href="#sec-1.3.1">1.3.1 Nonalphabetic</a></li>
-<li><a href="#sec-1.3.2">1.3.2 A</a></li>
-<li><a href="#sec-1.3.3">1.3.3 C</a></li>
-<li><a href="#sec-1.3.4">1.3.4 D</a></li>
-<li><a href="#sec-1.3.5">1.3.5 E</a></li>
-<li><a href="#sec-1.3.6">1.3.6 H</a></li>
-<li><a href="#sec-1.3.7">1.3.7 L</a></li>
-<li><a href="#sec-1.3.8">1.3.8 M</a></li>
-<li><a href="#sec-1.3.9">1.3.9 O</a></li>
-<li><a href="#sec-1.3.10">1.3.10 S</a></li>
-<li><a href="#sec-1.3.11">1.3.11 T</a></li>
-<li><a href="#sec-1.3.12">1.3.12 U</a></li>
-<li><a href="#sec-1.3.13">1.3.13 W</a></li>
+<li><a href="#sec-1.10.1">1.10.1 Nonalphabetic</a></li>
+<li><a href="#sec-1.10.2">1.10.2 A</a></li>
+<li><a href="#sec-1.10.3">1.10.3 B</a></li>
+<li><a href="#sec-1.10.4">1.10.4 C</a></li>
+<li><a href="#sec-1.10.5">1.10.5 D</a></li>
+<li><a href="#sec-1.10.6">1.10.6 E</a></li>
+<li><a href="#sec-1.10.7">1.10.7 F</a></li>
+<li><a href="#sec-1.10.8">1.10.8 H</a></li>
+<li><a href="#sec-1.10.9">1.10.9 L</a></li>
+<li><a href="#sec-1.10.10">1.10.10 M</a></li>
+<li><a href="#sec-1.10.11">1.10.11 O</a></li>
+<li><a href="#sec-1.10.12">1.10.12 R</a></li>
+<li><a href="#sec-1.10.13">1.10.13 S</a></li>
+<li><a href="#sec-1.10.14">1.10.14 T</a></li>
+<li><a href="#sec-1.10.15">1.10.15 U</a></li>
+<li><a href="#sec-1.10.16">1.10.16 W</a></li>
 </ul>
 </li>
 </ul>
 
 </div>
 
-<div id="outline-container-1.1" class="outline-4">
-<h4 id="sec-1.1"><span class="section-number-4">1.1</span> Description</h4>
-<div class="outline-text-4" id="text-1.1">
+<div id="outline-container-1.1" class="outline-3">
+<h3 id="sec-1.1"><span class="section-number-3">1.1</span> Description</h3>
+<div class="outline-text-3" id="text-1.1">
 
 
 
 
 </div>
 
-<div id="outline-container-1.2" class="outline-4">
-<h4 id="sec-1.2"><span class="section-number-4">1.2</span> Why use CLOD?</h4>
-<div class="outline-text-4" id="text-1.2">
+<div id="outline-container-1.2" class="outline-3">
+<h3 id="sec-1.2"><span class="section-number-3">1.2</span> Why use CLOD?</h3>
+<div class="outline-text-3" id="text-1.2">
 
 
 
 Commn Lisp programmers.
 </li>
 <li>
-If GraphViz is installed, automatically create a diagram showing the
+If GraphViz is installed, automatically create a diagram illustrating the
 package's class hierarchy &ndash; see <a href="http://www.graphviz.org/">http://www.graphviz.org/</a>
 </li>
 <li>
 {{{ modification-time(%r) }}}
 </pre>
 
-<p>12:35:59 AM
+<p>08:12:09 PM
 </p><pre class="example">
 {{{ date(%Y-%m-%d) }}}
 </pre>
 
-<p>2010-02-27
+<p>2010-03-01
 </p></li>
 <li>
 Define text macros, use with <code>{{{macro(arg1,arg2)}}}</code>
 </pre>
 
 
-
-</div>
-
-</div>
-
-<div id="outline-container-1.3" class="outline-4">
-<h4 id="sec-1.3"><span class="section-number-4">1.3</span> Dependencies</h4>
-<div class="outline-text-4" id="text-1.3">
+<ul>
+<li>
+Because CLOD works by introspection rather than parsing files,
+it copes effortlessly with unusual toplevel forms. Documentation
+generators that parse files usually won't be able to tell that your
+toplevel macro `=(defclass-easy &hellip;)=' (or whatever) actually
+expands to a class definition.
+</li>
+<li>
+For the same reason, CLOD avoids the problems with dependencies that
+can trouble other documentation generators (i.e. difficulties
+generating correct documentation unless you manually move things
+around in the source so that the doc generator finds things in
+the `right' order).
+</li>
+<li>
+Easily change the global appearance of the document by specifying a
+cascading style sheet (<i>note: only affects HTML export from Org mode</i>)
+
+</li>
+</ul>
+</div>
+
+</div>
+
+<div id="outline-container-1.3" class="outline-3">
+<h3 id="sec-1.3"><span class="section-number-3">1.3</span> Dependencies</h3>
+<div class="outline-text-3" id="text-1.3">
 
 
 
 
 </div>
 
-<div id="outline-container-1.4" class="outline-4">
-<h4 id="sec-1.4"><span class="section-number-4">1.4</span> How to use</h4>
-<div class="outline-text-4" id="text-1.4">
+<div id="outline-container-1.4" class="outline-3">
+<h3 id="sec-1.4"><span class="section-number-3">1.4</span> How to use</h3>
+<div class="outline-text-3" id="text-1.4">
 
 
 
 
 </div>
 
-<div id="outline-container-1.5" class="outline-4">
-<h4 id="sec-1.5"><span class="section-number-4">1.5</span> Writing the documentation</h4>
-<div class="outline-text-4" id="text-1.5">
-
-
-
-<p>
-All documentation produced by CLOD is obtained by introspection, i.e.  the
+<div id="outline-container-1.5" class="outline-3">
+<h3 id="sec-1.5"><span class="section-number-3">1.5</span> Writing the documentation</h3>
+<div class="outline-text-3" id="text-1.5">
+
+
+
+<p>
+All documentation produced by CLOD is obtained by <i>introspection</i>, i.e. by the
 running CL process examining itself. If a symbol has an associated docstring,
 it will be used by CLOD to produce the documentation for that symbol.
 </p>
 </pre>
 
 <p>Any text surrounded by these brackets will link to the same text (case
-insensitive) surrounded by <code>&lt;&lt;double angle brackets&gt;&gt;</code>. CLOD uses this to define
-hyperlinks for all symbols in the package. Every symbol MYSYMBOL has:
+insensitive) surrounded by <code>&lt;&lt;double angle brackets&gt;&gt;</code>. CLOD uses this to
+define hyperlinks for all symbols in the package. Every symbol MYSYMBOL has:
 </p><ol>
 <li>
 A hyperlink <code>&lt;&lt;function MYSYMBOL&gt;&gt;</code> if MYSYMBOL is a function,
 <code>&lt;&lt;variable MYSYMBOL&gt;&gt;</code> if it is a global variable, etc.
 </li>
 <li>
-A hyperlink <code>&lt;&lt;MYSYMBOL&gt;&gt;</code> which will either link to MYSYMBOL's documentation,
-or to a 'disambiguation section' if the same symbol has multiple meanings
-(eg there is both a function and a variable called MYSYMBOL).
+A hyperlink <code>&lt;&lt;MYSYMBOL&gt;&gt;</code> which will either link to MYSYMBOL's
+documentation, or to a 'disambiguation section' if the same symbol has
+multiple meanings (eg there is both a function and a variable called
+MYSYMBOL).
 </li>
 </ol>
 </li>
 <li>
 Org mode has the ability to use Emacs' font-lock mode to produce source code
-snippets that are correctly syntax highlighted for any major mode.
-To use this normally requires surrounding the code with <code>#+BEGIN_SRC ... #+END_SRC</code>.
+snippets that are correctly syntax highlighted for any major mode.  To use
+this normally requires surrounding the code with <code>#+BEGIN_SRC ... #+END_SRC</code>.
 CLOD provides a shortcut: Any lines within docstrings that begin with three
-semicolons ;;; are assumed to be example lisp source code. The first 3
+semicolons <code>;;;</code> are assumed to be example lisp source code. The first 3
 semicolons are removed and the rest of the line is syntax highlighted.
 
 </li>
 
 </div>
 
-<div id="outline-container-1.6" class="outline-4">
-<h4 id="sec-1.6"><span class="section-number-4">1.6</span> Example</h4>
-<div class="outline-text-4" id="text-1.6">
+<div id="outline-container-1.6" class="outline-3">
+<h3 id="sec-1.6"><span class="section-number-3">1.6</span> Example</h3>
+<div class="outline-text-3" id="text-1.6">
 
 
 
 Here is the docstring for <a href="#document-package">document-package</a>.
 </p>
 <pre class="example">
-* Usage
-: (document-package PKG FILE/STREAM &amp;key AUTO-LINKS
-:      LINES-BETWEEN-SECTIONS BRIEF-METHODS TITLE
-:      AUTHOR EMAIL)
 * Arguments
 - PKG :: A package name or package object.
 - FILE/STREAM :: A string (filename), stream object, or =NIL=.
 - AUTO-LINKS :: Boolean.
 - LINES-BETWEEN-SECTIONS :: Boolean.
 - BRIEF-METHODS :: Boolean.
+- STYLE-SHEET :: A string.
 - TITLE :: A string.
 - AUTHOR :: A string.
 - EMAIL :: A string.
   sections, just like functions and generic functions. Most people put
   'method' documentation in the docstrings of their generic functions, but
   if you set docstrings for individual methods then set this to nil.
+- =STYLE-SHEET= specifies the name of a Cascading Style Sheet (.CSS) file
+  which will be used as the style for the document if you export it
+  to HTML from org mode.
+
+* Example
+;;; (clod:document-package :mypkg "mypkg-doc.org"
+;;;      :style-sheet "swiss.css" :title "My Package"
+;;;      :author "F. B. Quux" :email "quux@gmail.com")
 
 * See also
 - [[document-packages]]
 
 </div>
 
-<div id="outline-container-1.7" class="outline-4">
-<h4 id="sec-1.7"><span class="section-number-4">1.7</span> Limitations</h4>
-<div class="outline-text-4" id="text-1.7">
-
-
-
-<ul>
-<li>
-There is no portable way to access the lambda lists of functions. Thus, you
-need to describe these manually in function docstrings.
-
-</li>
-</ul>
-</div>
-
-</div>
-
-<div id="outline-container-1.1" class="outline-3">
-<h3 id="sec-1.1"><span class="section-number-3">1.1</span> External Symbols</h3>
-<div class="outline-text-3" id="text-1.1">
-
-
-
-
-
-
-</div>
-
-<div id="outline-container-1.1.1" class="outline-4">
-<h4 id="sec-1.1.1"><span class="section-number-4">1.1.1</span> External Functions</h4>
-<div class="outline-text-4" id="text-1.1.1">
+<div id="outline-container-1.7" class="outline-3">
+<h3 id="sec-1.7"><span class="section-number-3">1.7</span> Class Hierarchy</h3>
+<div class="outline-text-3" id="text-1.7">
+
+
+
+<p>
+<img src="class.png"  alt="class.png" />
+</p>
+
+
+
+</div>
+
+</div>
+
+<div id="outline-container-1.8" class="outline-3">
+<h3 id="sec-1.8"><span class="section-number-3">1.8</span> External Symbols</h3>
+<div class="outline-text-3" id="text-1.8">
+
+
+
+
+
+
+</div>
+
+<div id="outline-container-1.8.1" class="outline-4">
+<h4 id="sec-1.8.1"><span class="section-number-4">1.8.1</span> External Functions</h4>
+<div class="outline-text-4" id="text-1.8.1">
 
 
 
 
 </div>
 
-<div id="outline-container-1.1.1.1" class="outline-5">
-<h5 id="sec-1.1.1.1"><span class="section-number-5">1.1.1.1</span> External Function: <code>document-package</code></h5>
-<div class="outline-text-5" id="text-1.1.1.1">
-
-
-
-</div>
-
-<div id="outline-container-1.1.1.1.1" class="outline-6">
-<h6 id="sec-1.1.1.1.1"><span class="section-number-6">1.1.1.1.1</span> Usage</h6>
-<div class="outline-text-6" id="text-1.1.1.1.1">
-
-
-<pre class="example">
-(document-package PKG FILE/STREAM &amp;key AUTO-LINKS
-     LINES-BETWEEN-SECTIONS BRIEF-METHODS CLASS-DIAGRAM
-     TITLE AUTHOR EMAIL)
+<div id="outline-container-1.8.1.1" class="outline-5">
+<h5 id="sec-1.8.1.1"><span class="section-number-5">1.8.1.1</span> External Function: <code>document-package</code></h5>
+<div class="outline-text-5" id="text-1.8.1.1">
+
+
+
+
+</div>
+
+<div id="outline-container-1.8.1.1.1" class="outline-7">
+<h7 id="sec-1.8.1.1.1"><span class="section-number-7">1.8.1.1.1</span> Syntax</h7>
+<div class="outline-text-7" id="text-1.8.1.1.1">
+
+
+
+
+
+<pre class="src src-lisp"><span style="color: #696969;">(</span>document-package PKG FILE/STREAM <span style="color: #d2691e; font-weight: bold;">&amp;key</span> AUTO-LINKS LINES-BETWEEN-SECTIONS BRIEF-METHODS CLASS-DIAGRAM STYLE-SHEET TITLE AUTHOR EMAIL)
 </pre>
 
-</div>
-
-</div>
-
-<div id="outline-container-1.1.1.1.2" class="outline-6">
-<h6 id="sec-1.1.1.1.2"><span class="section-number-6">1.1.1.1.2</span> Arguments</h6>
-<div class="outline-text-6" id="text-1.1.1.1.2">
+
+
+</div>
+
+</div>
+
+<div id="outline-container-1.8.1.1.1" class="outline-6">
+<h6 id="sec-1.8.1.1.1"><span class="section-number-6">1.8.1.1.1</span> Arguments</h6>
+<div class="outline-text-6" id="text-1.8.1.1.1">
 
 
 <dl>
 <dt>CLASS-DIAGRAM</dt><dd>
 Boolean.
 </dd>
+<dt>STYLE-SHEET</dt><dd>
+A string.
+</dd>
 <dt>TITLE</dt><dd>
 A string.
 </dd>
 
 </div>
 
-<div id="outline-container-1.1.1.1.3" class="outline-6">
-<h6 id="sec-1.1.1.1.3"><span class="section-number-6">1.1.1.1.3</span> Returns</h6>
-<div class="outline-text-6" id="text-1.1.1.1.3">
+<div id="outline-container-1.8.1.1.2" class="outline-6">
+<h6 id="sec-1.8.1.1.2"><span class="section-number-6">1.8.1.1.2</span> Returns</h6>
+<div class="outline-text-6" id="text-1.8.1.1.2">
 
 
 <p>
 
 </div>
 
-<div id="outline-container-1.1.1.1.4" class="outline-6">
-<h6 id="sec-1.1.1.1.4"><span class="section-number-6">1.1.1.1.4</span> Description</h6>
-<div class="outline-text-6" id="text-1.1.1.1.4">
+<div id="outline-container-1.8.1.1.3" class="outline-6">
+<h6 id="sec-1.8.1.1.3"><span class="section-number-6">1.8.1.1.3</span> Description</h6>
+<div class="outline-text-6" id="text-1.8.1.1.3">
 
 
 <p>
 the author, and the email address of the author.
 </li>
 <li>
+<code>STYLE-SHEET</code> specifies the name of a Cascading Style Sheet (.CSS) file
+which will be used as the style for the document if you export it
+to HTML from org mode.
+</li>
+<li>
 If <code>AUTO-LINKS</code> is non-nil, <b>all</b> occurrences of symbol names within the
 text of docstrings will be interpreted as hyperlinks, regardless of
 whether they are marked up as hyperlinks.
 
 </div>
 
-<div id="outline-container-1.1.1.1.5" class="outline-6">
-<h6 id="sec-1.1.1.1.5"><span class="section-number-6">1.1.1.1.5</span> See also</h6>
-<div class="outline-text-6" id="text-1.1.1.1.5">
+<div id="outline-container-1.8.1.1.4" class="outline-6">
+<h6 id="sec-1.8.1.1.4"><span class="section-number-6">1.8.1.1.4</span> Example</h6>
+<div class="outline-text-6" id="text-1.8.1.1.4">
+
+
+
+
+
+<pre class="src src-lisp"><span style="color: #696969;">(</span>clod:document-package <span style="color: #4169e1;">:mypkg</span> <span style="color: #008b00;">"mypkg-doc.org"</span>
+     <span style="color: #4169e1;">:style-sheet</span> <span style="color: #008b00;">"swiss.css"</span> <span style="color: #4169e1;">:title</span> <span style="color: #008b00;">"My Package"</span>
+     <span style="color: #4169e1;">:author</span> <span style="color: #008b00;">"F. B. Quux"</span> <span style="color: #4169e1;">:email</span> <span style="color: #008b00;">"quux@gmail.com"</span><span style="color: #696969;">)</span>
+</pre>
+
+
+
+</div>
+
+</div>
+
+<div id="outline-container-1.8.1.1.5" class="outline-6">
+<h6 id="sec-1.8.1.1.5"><span class="section-number-6">1.8.1.1.5</span> See also</h6>
+<div class="outline-text-6" id="text-1.8.1.1.5">
 
 
 <ul>
 
 </div>
 
-<div id="outline-container-1.1.1.2" class="outline-5">
-<h5 id="sec-1.1.1.2"><span class="section-number-5">1.1.1.2</span> External Function: <code>document-packages</code></h5>
-<div class="outline-text-5" id="text-1.1.1.2">
-
-
-
-</div>
-
-<div id="outline-container-1.1.1.2.1" class="outline-6">
-<h6 id="sec-1.1.1.2.1"><span class="section-number-6">1.1.1.2.1</span> Usage</h6>
-<div class="outline-text-6" id="text-1.1.1.2.1">
-
-
-<pre class="example">
-(document-packages PACKAGES FILE/STREAM &amp;key AUTO-LINKS
-     LINES-BETWEEN-SECTIONS BRIEF-METHODS TITLE
-     AUTHOR EMAIL)
+<div id="outline-container-1.8.1.2" class="outline-5">
+<h5 id="sec-1.8.1.2"><span class="section-number-5">1.8.1.2</span> External Function: <code>document-packages</code></h5>
+<div class="outline-text-5" id="text-1.8.1.2">
+
+
+
+
+</div>
+
+<div id="outline-container-1.8.1.2.1" class="outline-7">
+<h7 id="sec-1.8.1.2.1"><span class="section-number-7">1.8.1.2.1</span> Syntax</h7>
+<div class="outline-text-7" id="text-1.8.1.2.1">
+
+
+
+
+
+<pre class="src src-lisp"><span style="color: #696969;">(</span>document-packages PACKAGES FILE/STREAM <span style="color: #d2691e; font-weight: bold;">&amp;key</span> AUTO-LINKS LINES-BETWEEN-SECTIONS BRIEF-METHODS CLASS-DIAGRAM STYLE-SHEET TITLE AUTHOR EMAIL)
 </pre>
 
-</div>
-
-</div>
-
-<div id="outline-container-1.1.1.2.2" class="outline-6">
-<h6 id="sec-1.1.1.2.2"><span class="section-number-6">1.1.1.2.2</span> Arguments</h6>
-<div class="outline-text-6" id="text-1.1.1.2.2">
+
+
+</div>
+
+</div>
+
+<div id="outline-container-1.8.1.2.1" class="outline-6">
+<h6 id="sec-1.8.1.2.1"><span class="section-number-6">1.8.1.2.1</span> Arguments</h6>
+<div class="outline-text-6" id="text-1.8.1.2.1">
 
 
 <dl>
 A string (filename), stream object, or <code>NIL</code>.
 </dd>
 </dl>
-</div>
-
-</div>
-
-<div id="outline-container-1.1.1.2.3" class="outline-6">
-<h6 id="sec-1.1.1.2.3"><span class="section-number-6">1.1.1.2.3</span> Returns</h6>
-<div class="outline-text-6" id="text-1.1.1.2.3">
+
+<p>Other arguments are the same as for <a href="#document-package">document-package</a>.
+</p></div>
+
+</div>
+
+<div id="outline-container-1.8.1.2.2" class="outline-6">
+<h6 id="sec-1.8.1.2.2"><span class="section-number-6">1.8.1.2.2</span> Returns</h6>
+<div class="outline-text-6" id="text-1.8.1.2.2">
 
 
 <p>
 
 </div>
 
-<div id="outline-container-1.1.1.2.4" class="outline-6">
-<h6 id="sec-1.1.1.2.4"><span class="section-number-6">1.1.1.2.4</span> Description</h6>
-<div class="outline-text-6" id="text-1.1.1.2.4">
+<div id="outline-container-1.8.1.2.3" class="outline-6">
+<h6 id="sec-1.8.1.2.3"><span class="section-number-6">1.8.1.2.3</span> Description</h6>
+<div class="outline-text-6" id="text-1.8.1.2.3">
 
 
 <p>
 Produces documentation for all the packages in <code>PACKAGES</code>, within a
 single file.
+</p>
+<p>
 See <a href="#document-package">document-package</a> for more details.
 </p>
 
 
 </div>
 
-<div id="outline-container-1.2" class="outline-3">
-<h3 id="sec-1.2"><span class="section-number-3">1.2</span> Internal Symbols</h3>
-<div class="outline-text-3" id="text-1.2">
-
-
-
-
-
-
-</div>
-
-<div id="outline-container-1.2.1" class="outline-4">
-<h4 id="sec-1.2.1"><span class="section-number-4">1.2.1</span> Internal Types</h4>
-<div class="outline-text-4" id="text-1.2.1">
+<div id="outline-container-1.9" class="outline-3">
+<h3 id="sec-1.9"><span class="section-number-3">1.9</span> Internal Symbols</h3>
+<div class="outline-text-3" id="text-1.9">
+
+
+
+
+
+
+</div>
+
+<div id="outline-container-1.9.1" class="outline-4">
+<h4 id="sec-1.9.1"><span class="section-number-4">1.9.1</span> Internal Classes</h4>
+<div class="outline-text-4" id="text-1.9.1">
+
+
+
+<hr/>
+<p>
+<a name="animal" id="animal"></a>
+<a name="class==animal" id="class==animal"></a>
+</p>
+
+
+</div>
+
+<div id="outline-container-1.9.1.1" class="outline-5">
+<h5 id="sec-1.9.1.1"><span class="section-number-5">1.9.1.1</span> Internal Class: <code>animal</code></h5>
+<div class="outline-text-5" id="text-1.9.1.1">
+
+
+
+
+</div>
+
+<div id="outline-container-1.9.1.1.1" class="outline-6">
+<h6 id="sec-1.9.1.1.1"><span class="section-number-6">1.9.1.1.1</span> Inheritance</h6>
+<div class="outline-text-6" id="text-1.9.1.1.1">
+
+
+<ul>
+<li>
+Parent classes:
+<a href="#class==standard-object">standard-object</a>
+</li>
+<li>
+Precedence list:
+<a href="#class==animal">animal</a>, <a href="#class==standard-object">standard-object</a>, <a href="#class==t">t</a>
+</li>
+<li>
+Direct subclasses:
+<a href="#class==mammal">mammal</a>, <a href="#class==bird">bird</a>
+
+
+</li>
+</ul>
+</div>
+
+</div>
+
+<div id="outline-container-1.9.1.1.2" class="outline-6">
+<h6 id="sec-1.9.1.1.2"><span class="section-number-6">1.9.1.1.2</span> Description</h6>
+<div class="outline-text-6" id="text-1.9.1.1.2">
+
+
+<p>
+dummy class, created to illustrate CLOD's ability
+to produce class diagrams using GraphViz.
+</p>
+
+</div>
+
+</div>
+
+<div id="outline-container-1.9.1.1.3" class="outline-6">
+<h6 id="sec-1.9.1.1.3"><span class="section-number-6">1.9.1.1.3</span> Direct Slots</h6>
+<div class="outline-text-6" id="text-1.9.1.1.3">
+
+
+
+
+
+
+<hr/>
+<p>
+<a name="bird" id="bird"></a>
+<a name="class==bird" id="class==bird"></a>
+</p>
+
+</div>
+</div>
+
+</div>
+
+<div id="outline-container-1.9.1.2" class="outline-5">
+<h5 id="sec-1.9.1.2"><span class="section-number-5">1.9.1.2</span> Internal Class: <code>bird</code></h5>
+<div class="outline-text-5" id="text-1.9.1.2">
+
+
+
+
+</div>
+
+<div id="outline-container-1.9.1.2.1" class="outline-6">
+<h6 id="sec-1.9.1.2.1"><span class="section-number-6">1.9.1.2.1</span> Inheritance</h6>
+<div class="outline-text-6" id="text-1.9.1.2.1">
+
+
+<ul>
+<li>
+Parent classes:
+<a href="#class==animal">animal</a>
+</li>
+<li>
+Precedence list:
+<a href="#class==bird">bird</a>, <a href="#class==animal">animal</a>, <a href="#class==standard==object">standard-object</a>, <a href="#class==t">t</a>
+</li>
+<li>
+Direct subclasses:
+<a href="#class==hawk">hawk</a>
+
+
+</li>
+</ul>
+</div>
+
+</div>
+
+<div id="outline-container-1.9.1.2.2" class="outline-6">
+<h6 id="sec-1.9.1.2.2"><span class="section-number-6">1.9.1.2.2</span> Description</h6>
+<div class="outline-text-6" id="text-1.9.1.2.2">
+
+
+<p>
+dummy class, created to illustrate CLOD's ability
+to produce class diagrams using GraphViz.
+</p>
+
+</div>
+
+</div>
+
+<div id="outline-container-1.9.1.2.3" class="outline-6">
+<h6 id="sec-1.9.1.2.3"><span class="section-number-6">1.9.1.2.3</span> Direct Slots</h6>
+<div class="outline-text-6" id="text-1.9.1.2.3">
+
+
+
+
+
+
+<hr/>
+<p>
+<a name="cat" id="cat"></a>
+<a name="class==cat" id="class==cat"></a>
+</p>
+
+</div>
+</div>
+
+</div>
+
+<div id="outline-container-1.9.1.3" class="outline-5">
+<h5 id="sec-1.9.1.3"><span class="section-number-5">1.9.1.3</span> Internal Class: <code>cat</code></h5>
+<div class="outline-text-5" id="text-1.9.1.3">
+
+
+
+
+</div>
+
+<div id="outline-container-1.9.1.3.1" class="outline-6">
+<h6 id="sec-1.9.1.3.1"><span class="section-number-6">1.9.1.3.1</span> Inheritance</h6>
+<div class="outline-text-6" id="text-1.9.1.3.1">
+
+
+<ul>
+<li>
+Parent classes:
+<a href="#class==mammal">mammal</a>
+</li>
+<li>
+Precedence list:
+<a href="#class==cat">cat</a>, <a href="#class==mammal">mammal</a>, <a href="#class==animal">animal</a>, <a href="#class==standard-object">standard-object</a>, <a href="#class==t">t</a>
+</li>
+<li>
+Direct subclasses:
+None.
+
+
+</li>
+</ul>
+</div>
+
+</div>
+
+<div id="outline-container-1.9.1.3.2" class="outline-6">
+<h6 id="sec-1.9.1.3.2"><span class="section-number-6">1.9.1.3.2</span> Description</h6>
+<div class="outline-text-6" id="text-1.9.1.3.2">
+
+
+<p>
+dummy class, created to illustrate CLOD's ability
+to produce class diagrams using GraphViz.
+</p>
+
+</div>
+
+</div>
+
+<div id="outline-container-1.9.1.3.3" class="outline-6">
+<h6 id="sec-1.9.1.3.3"><span class="section-number-6">1.9.1.3.3</span> Direct Slots</h6>
+<div class="outline-text-6" id="text-1.9.1.3.3">
+
+
+
+
+
+
+<hr/>
+<p>
+<a name="dog" id="dog"></a>
+<a name="class==dog" id="class==dog"></a>
+</p>
+
+</div>
+</div>
+
+</div>
+
+<div id="outline-container-1.9.1.4" class="outline-5">
+<h5 id="sec-1.9.1.4"><span class="section-number-5">1.9.1.4</span> Internal Class: <code>dog</code></h5>
+<div class="outline-text-5" id="text-1.9.1.4">
+
+
+
+
+</div>
+
+<div id="outline-container-1.9.1.4.1" class="outline-6">
+<h6 id="sec-1.9.1.4.1"><span class="section-number-6">1.9.1.4.1</span> Inheritance</h6>
+<div class="outline-text-6" id="text-1.9.1.4.1">
+
+
+<ul>
+<li>
+Parent classes:
+<a href="#class==mammal">mammal</a>
+</li>
+<li>
+Precedence list:
+<a href="#class==dog">dog</a>, <a href="#class==mammal">mammal</a>, <a href="#class==animal">animal</a>, <a href="#class==standard-object">standard-object</a>, <a href="#class==t">t</a>
+</li>
+<li>
+Direct subclasses:
+None.
+
+
+</li>
+</ul>
+</div>
+
+</div>
+
+<div id="outline-container-1.9.1.4.2" class="outline-6">
+<h6 id="sec-1.9.1.4.2"><span class="section-number-6">1.9.1.4.2</span> Description</h6>
+<div class="outline-text-6" id="text-1.9.1.4.2">
+
+
+<p>
+dummy class, created to illustrate CLOD's ability
+to produce class diagrams using GraphViz.
+</p>
+
+</div>
+
+</div>
+
+<div id="outline-container-1.9.1.4.3" class="outline-6">
+<h6 id="sec-1.9.1.4.3"><span class="section-number-6">1.9.1.4.3</span> Direct Slots</h6>
+<div class="outline-text-6" id="text-1.9.1.4.3">
+
+
+
+
+
+
+<hr/>
+<p>
+<a name="hawk" id="hawk"></a>
+<a name="class==hawk" id="class==hawk"></a>
+</p>
+
+</div>
+</div>
+
+</div>
+
+<div id="outline-container-1.9.1.5" class="outline-5">
+<h5 id="sec-1.9.1.5"><span class="section-number-5">1.9.1.5</span> Internal Class: <code>hawk</code></h5>
+<div class="outline-text-5" id="text-1.9.1.5">
+
+
+
+
+</div>
+
+<div id="outline-container-1.9.1.5.1" class="outline-6">
+<h6 id="sec-1.9.1.5.1"><span class="section-number-6">1.9.1.5.1</span> Inheritance</h6>
+<div class="outline-text-6" id="text-1.9.1.5.1">
+
+
+<ul>
+<li>
+Parent classes:
+<a href="#class==bird">bird</a>
+</li>
+<li>
+Precedence list:
+<a href="#class==hawk">hawk</a>, <a href="#class==bird">bird</a>, <a href="#class==animal">animal</a>, <a href="#class==standard-object">standard-object</a>, <a href="#class==t">t</a>
+</li>