unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: Lisp help: problem with uninterned symbols
Date: Fri, 12 Dec 2003 19:54:42 GMT	[thread overview]
Message-ID: <jwvfzfpyfzc.fsf-monnier+gnu.emacs.help@vor.iro.umontreal.ca> (raw)
In-Reply-To: mailman.1638.1071244137.399.help-gnu-emacs@gnu.org

> I have a problem with symbols that aren't interned in any Emacs
> obarray.  I intern the symbols in my own tables, but I would still
> like to have the symbols as constants in my code, and have them
> compare eq as usual.

I think you're out of luck.  Same thing with any other object, by the way:
dumping a `cons' cell twice in two different forms will lose the sharing
information and will thus result in having two distinct cons cells when
read back.

Two solutions:
- somehow figure out a way to dump your data in a single form
- avoid dumping the raw data and instead force the use of my-intern when
  loading the file.  Maybe with something like

    (defvar my-item (my-intern "foo"))
    (defun foo () my-item)
    (defun bar () my-item)

  of course I strongly suspect that this example code is very different from
  your actual code and turning one into the other my be non-trivial.
  If you can't do it easily, post more details here and we'll happily make
  fun of you.


-- Stefan

  parent reply	other threads:[~2003-12-12 19:54 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 ` Lisp help: problem with uninterned symbols Pascal Bourguignon
2003-12-12 15:40   ` 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 [this message]
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=jwvfzfpyfzc.fsf-monnier+gnu.emacs.help@vor.iro.umontreal.ca \
    --to=monnier@iro.umontreal.ca \
    /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).