[Bese-devel] Re: with-xml-syntax in yaclml
Attila Lendvai
attila.lendvai at gmail.com
Sun May 14 20:04:14 UTC 2006
> (with-xml-syntax
> <foo <bar>>)
>
> no longer works. the original with-xml-syntax function was meant to be
> used in conjunction with arnesi's { read macro:
i was lacking quite some knowledge about reader stuff, and pobably
still lacking. but it's clear now that it was a bugous change and i've
already rolled back the with-xml-syntax part.
but looking at how *readtable* is restored after loading/compiling a
file, it seems like the rest of the stuff that counts nesting and
restores original reader char handlers are also pointless...
so, i've created this in arnesi:
(defmacro locally-enable-bracket-reader ()
"Enable bracket reader for the rest of the file (being loaded or compiled).
Be careful when using in different situations, because it modifies *readtable*!"
;; The standard sais that *readtable* is restored after
loading/compiling a file,
;; so we make a copy and alter that. The effect is that it will be enabled
;; for the rest of the file being processed.
`(eval-when (:compile-toplevel)
(setf *readtable* (copy-readtable *readtable*))
(enable-bracket-reader)))
and i'm planning to do the same for the xml-syntax and drop rest of
the pointless code counting the nesting of enable/disable calls and
backuping the old handlers.
but i'd better not commit anything until i hear some opinions to avoid
further noise in the repo...
- attila
(alias 101 on irc &no 'its not lisp code :)
More information about the bese-devel
mailing list