anchor.diff:    (package-view p))
   
   (defun welcome-view ()
  +  "Render the home screen of the site"
     (render-window (:title "Common Lisp Documentation Search Engine"
                      :class "welcome")
       (xhtml:div '()
  
positive.code:           (t (shorten-string (sr-val d :documentation) shorten-to)))))))
  
  (defun display-item-fn (d)
    (search-result-fn d nil))
  
  (defun package-view (package)
    (let ((doc (package-document package))
          (items (docs-for-term :package package)))
      (render-window
  
negative.code:     (hunchentoot:start *acceptor*)))
  
  (defun stop-server ()
    "Stops the running server if it exists"
    (when *acceptor*
      (hunchentoot:stop *acceptor*)
      (setf *acceptor* nil)
      T))
  
  (defun json-search-results-fn (doc score)
    "encodes a single search result as json"
    (json:as-array-member ()
      (json:with-object ()
        (iter (for n in (list :package :name :type :documentation))
  