anchor.diff:      (symbols-that-should-be-documented
        packages :excluded-packages excluded-packages
        :excluded-symbols excluded-symbols) 
  -    (symbols-documented-by-documents multi-doc))
  +    (symbols-documented-by-documents multi-doc default-package))
      #'string-lessp))
    
   #+ignore
  
positive.code: 	:sparql
  	:net.cluster)))
  
  (defun symbols-documented-by-document 
      (document &key (default-package :db.agraph))
    (let ((*package* (find-package default-package))
  	(markdown-package (find-package :cl-markdown)))
      (mapcar
       (lambda (symbol)
         (if (eql (symbol-package symbol) markdown-package)
  	   (intern (symbol-name symbol) *package*)
  	   symbol))
       (cl-containers:collect-keys
        (first (cl-containers:item-at-1 
  	      (cl-markdown::properties document) :documentation-anchors)) 
        :transform #'car))))
  
  (defun symbols-documented-by-documents (documents)
    (remove-duplicates
     (loop for document in documents append
  	(symbols-documented-by-document document))))
  
  (defun symbols-not-documented-by-multi-document 
      (multi-doc packages &key
       (excluded-packages (list :common-lisp
  			      #+allegro :excl))
       (excluded-symbols nil))
  
negative.code: 			 *package*))
  	  (os *output-stream*))
        (format os "~&<div id='symbols-not-documented' class='markdown-report'>~%")
        (format os "~&<h1>Exported Symbols not mentioned in the documentation</h1>~%")
        (cond (packages
  	     (let ((symbols (symbols-not-documented-by-multi-document
  			     documents
  			     packages
  			     *package*
  			     :excluded-symbols excluded)))
  	       (format os "~&<div>~%")
  	       (format os "~&<h2>From packages:</h2>~%")
  	       (format os "~&~{~&<span>~a</span> ~^ ~}"
  		       (mapcar #'package-name packages))
  	       (format os "~&</div>~%")
  	       (cond ((> (length symbols) 0)
  		      (format os "~&<h2>~:d Undocumented Symbols</h2>~%"
  			      (length symbols))
  		      (loop for s in symbols
  			 do (format os "~&<span>~s</span> ~%" s)))
  		     (t
  		      (format os "~&All exported symbols are documented.~%")))
  	       (when excluded
  		 (format os "~&<div class='excluded-symbols'>~%")
  		 (format os "~&<h2>Ignoring ~d symbols</h2>~%"
  			 (length excluded))
  		 (unless donot-display-excluded-symbols
  		   (format 
  		    os "~&~{<span class='excluded-symbol'>~s</span> ~^ ~%~}~%"
  		    excluded))
  		 (format os "~&</div>~%"))))
  	    (t
  	     (format os "~&<p>There are no packages specified by the 
  propoerty :documentation-packages~%")))
        (format os "~&</div>~%"))))
  
  ;; FIXME -- this is wrong (it's the same as unmentioned right now)
  (defextension (undocumented-symbols-report
  	       :arguments ((packages :keyword)
  			   (excluded-symbols :keyword)
  			   (donot-display-excluded-symbols :keyword)))
    (when (eq phase :render)
      (let ((packages (or packages
  			(document-property :documentation-packages)))
  	  (excluded (or excluded-symbols
  			(document-property :documentation-excluded-symbols)))
  	  (documents (document-property :documentation-documents))
  	  (*package* (or (document-property :docs-package)
  			 *package*))
  	  (os *output-stream*))
        (format os "~&<div id='symbols-not-documented' class='markdown-report'>~%")
        (format os "~&<h1>Exported Symbols not mentioned in the documentation</h1>~%")
        (cond (packages
  	     (let ((symbols (symbols-not-documented-by-multi-document
  			     documents
  			     packages
  			     *package*
  			     :excluded-symbols excluded)))
  	       (format os "~&<div>~%")
  	       (format os "~&<h2>From packages:</h2>~%")
  	       (format os "~&~{~&<span>~a</span> ~^ ~}"
  		       (mapcar #'package-name packages))
  	       (format os "~&</div>~%")
  	       (cond ((> (length symbols) 0)
  		      (format os "~&<h2>~:d Undocumented Symbols</h2>~%"
  			      (length symbols))
  		      (loop for s in symbols
  			 do (format os "~&<span>~s</span> ~%" s)))
  		     (t
  		      (format os "~&All exported symbols are documented.~%")))
  	       (when excluded
  		 (format os "~&<div class='excluded-symbols'>~%")
  		 (format os "~&<h2>Ignoring ~d symbols</h2>~%"
  			 (length excluded))
  		 (unless donot-display-excluded-symbols
  		   (format 
  		    os "~&~{<span class='excluded-symbol'>~s</span> ~^ ~%~}~%"
  		    excluded))
  		 (format os "~&</div>~%"))))
  	    (t
  	     (format os "~&<p>There are no packages specified by the 
  propoerty :documentation-packages~%")))
        (format os "~&</div>~%"))))
  
  (defextension (documented-symbols-report)
    (when (eq phase :render)
      (let* ((documents (document-property :documentation-documents))
  	   (*package* (or (document-property :docs-package)
  			  *package*))
  	   (os *output-stream*)
  	   (symbols (symbols-documented-by-document 
  		     documents *package*)))
        (format os "~&<div id='documented-symbols-report' class='markdown-report'>~%")
        (format os "~&<h1>Documented symbols</h1>~%")
        (cond ((> (length symbols) 0)
  	     (format os "~&<h2>~:d Documented Symbols</h2>~%"
  		     (length symbols))
  	     (loop for s in symbols
  		do (format os "~&<span>~s</span> ~%" s)))
  	    (t
  	     (format os "~&All exported symbols are documented.~%")))
        (format os "~&</div>~%"))))
  
  (defextension (markdown-warnings-report
  	       :arguments ())
    (when (eq phase :render)
      (bind ((os *output-stream*)
  	   (document (document-property :documentation-document))
  	   (documents (merge-elements
  		       (warnings document)
  		       (lambda (old new)
  			 (push new old))
  		       (lambda (new)
  			 (list new))
  		       :key 'first :argument 'cdr
  		       :filter (lambda (pair)
  				 (typep (first pair) 'document #+(or) 'child-document))))
  	  (warnings? nil))
        (format os "~&<div id='markdown-warnings' class='markdown-report'>~%")
        (format os "~&<h1>Markdown Warnings</h1>~%")
  
        (setf documents (sort documents #'string-lessp
  		  :key (compose 'ensure-string 'source 'first)))
        (loop for (document warnings) in documents do
  	   (when warnings
  	     (setf warnings? t)
  	     (format os "~&<div>~%")
  	       (format os "~&<h2>~a</h2>~%"
  		     (short-source (source document)))
  	     (format os "~&<ul>~%")
  	     (loop for warning in (merge-elements 
  				   warnings
  				   (lambda (old new) 
  				     (declare (ignore new)) 
  				     (incf (second old))
  				     old)
  				   (lambda (new) (list new 1))
  				   :test 'equal
  				   :return :values) do
  		  (format os "~&<li>~a</li>~%" warning))
  	     (format os "~&</ul>~%")
  	     (format os "~&</div>~%")))
  