[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
alists with precomputed variables
From: |
Erik Iverson |
Subject: |
alists with precomputed variables |
Date: |
Tue, 20 Jan 2009 23:03:52 -0600 |
User-agent: |
Thunderbird 2.0.0.19 (X11/20090105) |
Dear all,
I'm an Elisp beginner, just learning over the last few days. Very naive
question here, with hopefully a simple answer.
I would like to create an alist where one of the values is something
that I compute earlier. Example,
I naively thought that
(setq my-var 20)
(setq my-alist '((p1 . 10) (p2 . my-var)))
would give me
((p1 . 10) (p2 . 20))
, but it instead results in
((p1 . 10) (p2 . my-var))
How can I get what I expected?
If this is a wrong-headed question, please let me know.
Thanks,
Erik
- alists with precomputed variables,
Erik Iverson <=