plugins/cl-who.lisp (721 bytes)
1 (eval-when (:compile-toplevel :load-toplevel) 2 (ql:quickload 'cl-who)) 3 4 (defpackage :coleslaw-cl-who 5 (:use #:cl #:cl-who) 6 (:import-from #:coleslaw :render-text) 7 (:export #:enable)) 8 9 (in-package :coleslaw-cl-who) 10 11 (defmethod render-text (text (format (eql :cl-who))) 12 (let* ((*package* (find-package "COLESLAW-CL-WHO")) 13 (sexps (with-input-from-string (v text) 14 (do* ((line (read v) 15 (read v nil 'done)) 16 (acc (list line) 17 (cons line acc))) 18 ((eql line 'done) 19 (nreverse (cdr acc))))))) 20 (eval `(with-html-output-to-string (v) ,@sexps)))) 21 22 (defun enable () 23 )