17 Apr 2011 15:05
Problems with indent
Marco Antoniotti <antoniotti.marco <at> disco.unimib.it>
2011-04-17 13:05:32 GMT
2011-04-17 13:05:32 GMT
Hi,
I would like to use CL-WHO for a little project of mine and I am getting bogged down by the :indent behavior. Note that I am not trying to generate any PRE tags (yet). The following snippet illustrates the problem. Given the expansion of with-html-output, cl-who::*indent* does not behave as a special variable and this prevents me from producing "properly" indented HTML.
(use-package "CL-WHO")
(defun who-test (x &optional (out *standard-output*) (indent 2))
(let ((cl-who::*indent* indent))
(declare (special cl-who::*indent*))
(with-html-output (out out :indent 4 #| indent |#)
(htm (:body (:frameset :rows "65px" :border 0 :noresize "noresize"
(frame-stuff x)))
))))
(defun frame-stuff (x &optional (out *standard-output*))
(with-html-output (out out :indent 3)
(htm (:frame :src x))))
(use-package "CL-WHO")
(defun who-test (x &optional (out *standard-output*) (indent 2))
(let ((cl-who::*indent* indent))
(declare (special cl-who::*indent*))
(with-html-output (out out :indent 4 #| indent |#)
(htm (:body (:frameset :rows "65px" :border 0 :noresize "noresize"
(frame-stuff x)))
))))
(defun frame-stuff (x &optional (out *standard-output*))
(with-html-output (out out :indent 3)
(htm (:frame :src x))))
If you remove the 4 and uncomment indent you will see what happens.
Any suggestions about how to "fix" this? Note that I do want the inner function pretty much 'as-is'.
Cheers
Marco
<div>Hi,<div><br></div> <div>I would like to use CL-WHO for a little project of mine and I am getting bogged down by the :indent behavior. Note that I am not trying to generate any PRE tags (yet). The following snippet illustrates the problem. Given the expansion of with-html-output, cl-who::*indent* does not behave as a special variable and this prevents me from producing "properly" indented HTML.<br><div> <br>(use-package "CL-WHO")<br><br>(defun who-test (x &optional (out *standard-output*) (indent 2))<br> (let ((cl-who::*indent* indent))<br> (declare (special cl-who::*indent*))<br> (with-html-output (out out :indent 4 #| indent |#)<br> (htm (:body (:frameset :rows "65px" :border 0 :noresize "noresize"<br> (frame-stuff x)))<br> ))))<br><br>(defun frame-stuff (x &optional (out *standard-output*))<br> (with-html-output (out out :indent 3)<br> (htm (:frame :src x))))<br><br><div>If you remove the 4 and uncomment indent you will see what happens.</div> <div><br></div> <div>Any suggestions about how to "fix" this? Note that I do want the inner function pretty much 'as-is'.</div> <div><br></div> <div>Cheers</div> <div><br></div> <div>Marco</div> <div><br></div> </div> </div> </div>
RSS Feed