[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Old-style backquotes in cc-vars.el
From: |
Thien-Thi Nguyen |
Subject: |
Re: Old-style backquotes in cc-vars.el |
Date: |
Sat, 06 Oct 2007 23:46:54 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) |
() Alan Mackenzie <address@hidden>
() Sat, 6 Oct 2007 20:51:18 +0000
Can you explain to me what it is doing? If so, please do! :-)
it (or rather, the funky fragment in question) is converting the
given `:type FOO', mined out of the rest `args', to an aggregate
`:type (radio STYLE (PREAMBLE FOO))'. `radio' means choose one of
the following exclusively.
STYLE stands for the choice where the value is taken from some style
setting (you probably know more about this than i do).
PREAMBLE is optionally prepended to FOO; that is, if FOO contains
:tag or :value, the respective 2-list component is ignored.
finally, the recomposed :type 2-list is spliced back into `args', the
value of which should be valid spec for `custom-declare-variable'.
> (type (eval (list 'identity (plist-get args :type))))
It doesn't quite work - (car type) bombs, because type is
'integer, not a list. I'll figure out, though.
drat, i knew i forgot something. please try this, instead:
> (typ (eval (list 'identity (plist-get args :type))))
> (type (if (consp typ) typ (list typ)))
here we ensure `type' is consp rather than trying to handle
non-consp `type'.
thi