[Bese-devel] custom yaclml and deftag-macro
Attila Lendvai
attila.lendvai at gmail.com
Mon Feb 5 11:43:24 UTC 2007
> Ok this works. I have a request since the current situation breaks older macros. it's very time consuming to fix old codes as you know.
>
> It would be better if we can have something like:
>
> (deftag-macro x (&attribute xyz &allow-other-attributes others &allow-custom-attributes custom)
> `(<:input (@ , at custom) :name ,xyz ,others))
that should be , at others, but read below.
we have a choice here:
- currently OTHERS also contain the CUSTOM attributes when
&allow-other-attributes is given. this simplifies using
&allow-other-attributes, but it also means that "SomE" non-keyword
attribute names can appear in the OTHERS list, so you can't simply
, at OTHERS, but have to (@ , at OTHERS) to propagate the attributes to the
inner tag.
- this could be dropped and OTHERS/CUSTOMS separated and then , at OTHERS
were safe for the simple , at OTHERS, but then you would have to deal
with &allow-custom-attributes separately with an additional (@
, at CUSTOMS) if you want to allow custom attributes. imho this is
cumbersome most of the time. i think most of the time you just want to
specify that you allow other attributes to disable the warnings, and
you don't care if they will be specified as keyword attrs or custom
attrs.
that's why i've decided for the former which is implemented currently.
but i think it's compatible with the old code as long as you don't use
custom attributes but they didn't exist before so i think it should be
backwards compatible.
> I'm happy with the @ sign btw, why did you think to change it to *?
you missed an important detail, before the patch
(let ((x '("foo" 42))
(<:bar (@ x) :some "other"))
was taking the attribute list found in X _at runtime_, which i think
is different enough to deserve a different notation. i've proposed (*
x var2 ...) for that.
hth,
--
- attila
"- The truth is that I've been too considerate, and so became
unintentionally cruel...
- I understand.
- No, you don't understand! We don't speak the same language!"
(Ingmar Bergman - Smultronstället)
More information about the bese-devel
mailing list