Paul Sexton  committed 7634b12

- Fix to make documentation of 'eql'-specialiser methods work correctly under Lispworks
- The PNG file containing the class diagram produced by GraphViz is now named with a numerical suffix, so that multiple class diagrams
can exist concurrently.
Thanks to Raymond Wiker for these fixes.

  • Participants
  • Parent commits cec2f43

Comments (0)

Files changed (1)

 The output file is in /Org/ format. Org is a simple but powerful 'wiki-like'
 markup language that is understood by *Org-mode*, a powerful outliner, personal
-wiki and organiser that runs as a major mode within Emacs. Org-mode can export
-org-format files to numerous other formats, including HTML, LaTeX, PDF,
-DocBook, and plain text.
+wiki and organiser that runs as a major mode within the /Emacs/ text
+editor. Org-mode can export org-format files to numerous other formats,
+including HTML, LaTeX, PDF, DocBook, and plain text.
 More information:
-- Emacs :: [[]] (if you program CL, you don't
+- Emacs :: [[]] (if you program CL, you won't
   need to be told what Emacs is)
 - Org mode :: [[]]
 - You can use org markup within docstrings (easy for humans to read) to
   create subsections, bulleted lists, hyperlinks within the document or
   to external URLs, etc.
-- Easy export to multiple file formats: text, HTML, LaTeX -> PDF...
+- Easy export to multiple file formats: text, HTML, DocBook, 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 illustrating the
 * Dependencies
-- Closer-MOP:
-- Iterate:
+- ASDF: [[]]
+- Closer-MOP: [[]]
+- Iterate: [[]]
+- CL-PPCRE: [[]]
 * How to use
 markup, hyperlinks to other definitions, and syntax highlighting of lisp source
 code examples.
-: * Arguments
+: \"* Arguments
 : - PKG :: A package name or package object.
 : - FILE/STREAM :: A string (filename), stream object, or =NIL=.
 : - AUTO-LINKS :: Boolean.
 :   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.
+:   to HTML from org mode.\"
 : * Example
 : ;;; (clod:document-package :mypkg \"\"
   "If true, creates a section describing the package class hierarchy as a
 'dot' diagram, which can be fed to the GraphViz program (if installed) to
 create a visual representation of the hierarchy.")
+(defparameter *class-diagram-counter* 0
+  "Counter that is incremented by one each time a class diagram is
+created. Used to construct the name of the class diagram PNG file that
+is produced by `dot'.")
 (defvar *document-title* "Documentation"
   "The title of the document. A string.")
 (defvar *document-author* "CLOD"
   (make-link (class-name (class-of o)) :class :text text))
 (defmethod make-link ((c eql-specializer) (entity (eql :class))  &key text)
   (declare (ignore text))
   (format nil "~S" `(eql ,(eql-specializer-object c))))
+(defmethod make-link (c (entity (eql :class)) &key text)
+  (declare (ignorable text))
+  (if (clos:eql-specializer-p c)
+    (format nil "~S" `(eql ,(eql-specializer-object c)))
+    (call-next-method c entity text)))
 (defun make-class-link (x &key text)
   "Synonym for ([[make-link]] =X :class=)."
      "# 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 "~&#+begin_dot class-~4,'0d.png -Tpng~%"
+               (incf *class-diagram-counter*))
     (write-out "digraph data_relationships {~%")
     (write-out "   rankdir=\"LR\";~%")
     (dolist (c classes)