[Bese-devel] code in inspector

William Halliburton whalliburton at gmail.com
Fri Aug 5 21:31:04 UTC 2005


The following hack makes the code output more readable. 

(defmethod render-on ((res response) (insp ucw-inspector))
  (multiple-value-bind (title content)
      (swank::inspect-for-emacs (slot-value insp 'datum)
(swank::make-default-inspector))
    (<:h2 (<:as-html title))
    (dolist (part content)
      (etypecase part
        (null nil)
        (string (if (< (length part) 100) (<:as-html part) (<:pre
(<:as-html part))))
        (cons (swank::destructure-case part
                ((:newline) (<:br))
                ((:value obj &optional (str (prin1-to-string obj)))
                 (<ucw:a :action (call-inspector insp obj)
                         (<:as-html str)))
                ((:action text lambda)
                 (<ucw:a :action (call-action insp lambda)
                         (<:as-html text)))))))
    (<:p (<ucw:a :action (ok insp)) "Ok.")))



More information about the bese-devel mailing list