==== cl-who/who.lisp#3 - cl-who/who.lisp ==== @@ -224,15 +224,18 @@ ;; do the same things as above but at runtime nconc (list `(let ((,=var= ,val)) (cond ((null ,=var=)) - ((and (eq ,=var= t) (eq *html-mode* :xml)) - (htm ,(format nil " ~A=~C~A~C" - (string-downcase attr) - *attribute-quote-char* - (string-downcase attr) - *attribute-quote-char*))) - ((and (eq ,=var= t) (eq *html-mode* :sgml)) - (htm ,(format nil " ~A" - (string-downcase attr)))) + ((eq ,=var= t) + ,(case *html-mode* + (:sgml + `(htm ,(format nil " ~A" + (string-downcase attr)))) + ;; otherwise default to :xml mode + (t + `(htm ,(format nil " ~A=~C~A~C" + (string-downcase attr) + *attribute-quote-char* + (string-downcase attr) + *attribute-quote-char*))))) (t (htm ,(format nil " ~A=~C" (string-downcase attr) *attribute-quote-char*) @@ -429,11 +432,10 @@ (and (atom x) (eq x 'htm))) (tree-to-commands-aux - (list* 'htm - +newline+ - prologue - +newline+ - (tree-to-template tree)) + (if prologue + (list* 'htm prologue +newline+ + (tree-to-template tree)) + (cons 'htm (tree-to-template tree))) stream)))) (defmacro with-html-output ((var &optional stream