[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Lisp help: problem with uninterned symbols
From: |
Pascal Bourguignon |
Subject: |
Re: Lisp help: problem with uninterned symbols |
Date: |
12 Dec 2003 16:09:11 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
Lars Brinkhoff <lars@nocrew.org> writes:
> ;;; file foobar.el
> (let ()
> (defun foo () (eval-when-compile (my-intern "foo")))
> (defun bar () (eval-when-compile (my-intern "foo"))))
>
> the result is:
>
> ;;; file foobar.elc
> [...]
> (byte-code "\300\301M\210\302\303M\207"
> [foo #[nil "\300\207" [#1=#:foo] 1] bar #[nil "\300\207" [#1#]
> 1]]
> 2)
>
> Here, there's only one #:foo which is referenced a second time with
> #1#. Great, (eq (foo) (bar)) works again. However, that trick
> doesn't work if foo and bar are defined in two separate file.
>
> Any idea how to solve this?
Doctor, when I do this, it hurts!
You have the solution: encapsulate your compilation units in a progn.
--
__Pascal_Bourguignon__ . * * . * .* .
http://www.informatimago.com/ . * . .*
There is no worse tyranny than to force * . . /\ () . *
a man to pay for what he does not . . / .\ . * .
want merely because you think it .*. / * \ . .
would be good for him. -- Robert Heinlein . /* o \ .
http://www.theadvocates.org/ * '''||''' .
SCO Spam-magnet: postmaster@sco.com ******************
Re: Lisp help: problem with uninterned symbols, Stefan Monnier, 2003/12/12