[cl-who-devel] strange behaviour: package and/or macro relevant?

olivier buechel olivier.buechel at gmail.com
Mon Aug 25 23:42:08 UTC 2008


This works:
(in-package :cl-user)
(let* ((txt1 "hallo")
        (txt2 "yellow"))
  (cl-who:show-html-expansion (str nil :indent t)
    ((:a) txt1 txt2)))

This does not work and hell breaks out when compiling:
(defpackage :dummy-package
  (:use :cl :cl-user :cl-who))
(in-package :dummy-package)
(let* ((txt1 "hallo")
        (txt2 "yellow"))
  (cl-who:show-html-expansion (str nil :indent t)
    ((:a) txt1 txt2)))
==>
(LET ((STR STR))
  (PROGN
   (WRITE-STRING "
<a>
  "
                 LET ((#:G1 NIL)) (WHEN #:G1 (PRINC #:G1 STR)))
   TXT1
   (WRITE-STRING "
  "
                 LET ((#:G2 NIL)) (WHEN #:G2 (PRINC #:G2 STR)))
   TXT2
   (WRITE-STRING "
</a>"
                 LET ((#:G3 NIL)) (WHEN #:G3 (PRINC #:G3 STR)))))

Well, I really don't get it with packages, so I just tried around and found
that this code here works:
(defpackage :dummy-package
  (:use :cl :cl-user :cl-who))
(in-package :dummy-package)
(let* ((txt1 "hallo")
        (txt2 "yellow"))
  (cl-who:show-html-expansion (s nil :indent t)
    ((:a) txt1 txt2)))

So kind-of it's not the package alone the problem, somehow
it's the combination of package and using str in macro
Ha, just tried with fmt instead of str: same problem
Hint: Maybe no protection with gensym? And why does it work in cl-user?!?

Using cl-who-0.11.1

And yes, I was in hell...
And now (after changing str to s) I want just to understand what happend to
me.
thanks
olli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cl-who-devel/attachments/20080826/9ca871ad/attachment.html>


More information about the Cl-who-devel mailing list