unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Pascal Bourguignon <spam@thalassa.informatimago.com>
Subject: Re: Lisp help: problem with uninterned symbols
Date: 12 Dec 2003 16:09:11 +0100	[thread overview]
Message-ID: <87smjqoyy0.fsf@thalassa.informatimago.com> (raw)
In-Reply-To: mailman.1638.1071244137.399.help-gnu-emacs@gnu.org

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                 ******************

       reply	other threads:[~2003-12-12 15:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1638.1071244137.399.help-gnu-emacs@gnu.org>
2003-12-12 15:09 ` Pascal Bourguignon [this message]
2003-12-12 15:40   ` Lisp help: problem with uninterned symbols Lars Brinkhoff
     [not found]   ` <mailman.1639.1071247380.399.help-gnu-emacs@gnu.org>
2003-12-12 17:17     ` Pascal Bourguignon
2003-12-12 21:59       ` Lars Brinkhoff
2003-12-12 23:37         ` Lars Brinkhoff
2003-12-12 19:54 ` Stefan Monnier
2003-12-12 20:44   ` Lars Brinkhoff
2003-12-12 14:46 Lars Brinkhoff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87smjqoyy0.fsf@thalassa.informatimago.com \
    --to=spam@thalassa.informatimago.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).