all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* alists with precomputed variables
@ 2009-01-21  5:03 Erik Iverson
  2009-01-21  5:13 ` Drew Adams
       [not found] ` <mailman.5420.1232514814.26697.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Erik Iverson @ 2009-01-21  5:03 UTC (permalink / raw)
  To: help-gnu-emacs

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




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-01-21  7:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-21  5:03 alists with precomputed variables Erik Iverson
2009-01-21  5:13 ` Drew Adams
     [not found] ` <mailman.5420.1232514814.26697.help-gnu-emacs@gnu.org>
2009-01-21  5:49   ` Barry Margolin
2009-01-21  7:54     ` Drew Adams

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.