help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lisp help: problem with uninterned symbols


From: Stefan Monnier
Subject: Re: Lisp help: problem with uninterned symbols
Date: Fri, 12 Dec 2003 19:54:42 GMT
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]