Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Interning Symbols

0 views
Skip to first unread message

Nordlöw

unread,
Nov 11, 2009, 1:47:15 PM11/11/09
to
Is it possible to intern a symbol and make it have a property whose
value is a references to a another object like we do with setf()?

If I want to copy a symbol along with all its 4 components into
another obarray do I have to manually copy (using get and set) the
value, function def and property-list?

/Nordlöw

Kevin Rodgers

unread,
Nov 12, 2009, 1:26:14 AM11/12/09
to help-gn...@gnu.org
Nordl�w wrote:
> Is it possible to intern a symbol and make it have a property whose
> value is a references to a another object like we do with setf()?

Do you mean, does this work:

(setq my-obarray (make-vector 1021 0))

(setf (get (intern "foo" my-obarray) 'some-property)
(evaluates-to-some-object))

I don't know why it wouldn't:

(require 'cl)
(macroexpand (quote ...)) =>

(let* ((--cl-var-- (intern "foo" my-obarray))) (put --cl-var-- (quote
some-property) (evaluates-to-some-object)))

> If I want to copy a symbol along with all its 4 components into
> another obarray do I have to manually copy (using get and set) the
> value, function def and property-list?

Yes.

--
Kevin Rodgers
Denver, Colorado, USA

0 new messages