anchor.diff:  	   (format *output-stream*
   		   "</span>"))
   	 (format *output-stream* 
  -		 "~&<span class=\"documentation-kind\">~a</span>" kind)
  +		 "~&<span class=\"documentation-kind\">~a</span>" identity)
   	 (format *output-stream* "~&</div>")
   	 (format *output-stream* 
   		 "<div class=\"documentation contents\">")	   
  
positive.code: 	 (format *output-stream* "~&</div>"))
         nil))))
  
  (defextension (docs-index :arguments ((kind :required) (sorted :keyword)))
    (when (eq phase :render)
      (bind ((item-table (item-at-1 
  			(item-at-1 (metadata *current-document*) :docs) kind)))
        (if (empty-p item-table)
  	  (warn "There are no items of kind ~a documented." kind)
  	  (bind ((items (collect-keys item-table)))
  	    (when sorted (setf items (sort items #'string-lessp)))
  	    (format *output-stream* 
  		    "~&<a href=\"index-~a\"></a>" kind)
  	    (format *output-stream* 
  		    "~&<div class=\"index ~(~a~)\">" kind)
  	    (format *output-stream* "~&<ul>")
  	    (loop for item in items do
  		 (format *output-stream* "~&<li><a href=\"#~a-~a\">\~a</a></li>" 
  			 item kind item))
  	    (format *output-stream* "~&</ul></div>"))))))
  
  (defun add-docs-item (thing kind)
    (add-docs-link thing kind)
    (bind ((docs-items
  	  (or (item-at-1 (metadata *current-document*) :docs)
  	      (setf (item-at-1 (metadata *current-document*) :docs)
  		    (make-container 'simple-associative-container))))
  	 (kind-items
  	  (or (item-at-1 docs-items kind)
  	      (setf (item-at-1 docs-items kind)
  		    (make-container 'simple-associative-container)))))
      (setf (item-at-1 kind-items thing) t)))
  
  (defun add-docs-link (thing kind)
    (bind ((kinds (symbol-identities thing))
  	 ((values name title)
  	  (if (length-1-list-p kinds)
  	      (values (format nil "~a" thing) 
  		      (format nil "description of ~a" thing))
  	      (values (format nil "~a.~a" kind thing)
   		      (format nil "description of ~a ~a" kind thing)))))
      (setf (item-at (link-info *current-document*) name)
  	  (make-instance 'link-info
  			 :id name :url (format nil "#~a" name) 
  			 :title title))))
      
  (defun symbol-may-have-arguments-p (symbol)
    (and (fboundp symbol)
  
negative.code: 		thing
  		(intern (symbol-name thing) package)))
      (string (intern thing package))))
       
  (defextension (docs :arguments ((name) (kind)))
    (bind ((*package* (or (docs-package) *package*))
  	 (thing (ensure-symbol name *package*))
  	 ((values kinds nil)
  	  (aif (symbol-identities-with-docstring thing kind)
  	       (values it t)
  	       (values (mapcar (lambda (x) (cons x nil))
  			       (symbol-identities thing)) nil)))
  	 (kind (first kinds)))
      (ecase phase 
        (:parse
         ;;?? could memoize this (where is it stored? in add-docs-item?)
         (when (> (length kinds) 1)
  	 (warn "Multiple interpretations found for ~s; specify type (using ~a)" 
  	       name (car (first kinds))))
         (unless kinds
  	 (warn "No docstring found for ~s" name))
         (add-docs-item thing (car kind)))
        (:render
         (let ((docs (and (cdr kind) (documentation thing (cdr kind))))
  	     (identity (car kind)))
  	 (format *output-stream* 
  		 "~&<a name=\"~a-~a\" id=\"~a-~a\"></a>" 
  		 name identity name identity)
  	 (format *output-stream* 
  		 "~&<a name=\"~a\" id=\"~a\"></a>" 
  		 name name)
  	 (format *output-stream* 
  		 "<div class=\"documentation ~(~a~)\">" identity)
  	 (format *output-stream* 
  		 "<div class=\"documentation header\">")
  	 (format *output-stream* "<span class=\"hidden\">X</span>")
  