From: Denis Bueno <dbueno@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Structured data in Emacs Lisp
Date: Tue, 26 Apr 2005 11:28:48 -0400 [thread overview]
Message-ID: <6dbd4d0005042608284f545f6d@mail.gmail.com> (raw)
In-Reply-To: <op.spuh8su4p52o26@home-ca12fabbc0>
On 4/26/05, PT <mailshield.gg@mailnull.com> wrote:
<snip explanation>
> Or maybe an association list? '((value1 . 3) (value2 . 4) (value3 . 5))
> It's certainly more resistant to code changes, but feels a bit
> heavyweight. (Maybe its just me.)
You could use a plist:
(:key1 1 :key2 2)
Then to get a particular value:
(getf '(:key1 1 :key2 2) :key1)
=> 1
According to C-h f getf RET:
getf is a compiled Lisp function in `cl-extra'.
(getf plist tag &optional def)
So you might need to do (require 'cl) before using it....
-Denis
PGP: http://pgp.mit.edu:11371/pks/lookup?search=0xA1B51B4B&op=index
next prev parent reply other threads:[~2005-04-26 15:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-26 15:20 Structured data in Emacs Lisp PT
2005-04-26 15:28 ` Denis Bueno [this message]
[not found] ` <mailman.3069.1114529432.2895.help-gnu-emacs@gnu.org>
2005-04-26 15:57 ` PT
2005-04-26 16:59 ` Jim Ottaway
2005-04-27 5:35 ` Ian Zimmerman
2005-04-26 16:03 ` Phillip Lord
2005-04-26 17:21 ` PT
2005-04-27 11:13 ` Phillip Lord
2005-04-27 15:27 ` Klaus Berndl
2005-04-27 18:38 ` PT
2005-05-09 21:39 ` Christopher C. Stacy
2005-05-10 10:05 ` Phillip Lord
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6dbd4d0005042608284f545f6d@mail.gmail.com \
--to=dbueno@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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.
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.