On Thu, Nov 23, 2006 at 03:10:19PM +0100, Henri Lesourd wrote:
> Have a look at the attached .tm file, and tell me if you can
> still trick it the way you did in the examples of your previous
> mail (i.e., try to interactively change the parameter of
> the two instances of the <self-path*|...> macros in the
> document). I guess that as far as the <self-path|...> macro
> is concerned, you can't trick it anymore, now ;-).
It does have the disadvantage of variable capture, namely the "x" is
hardcoded in the Scheme function. I tried to return:
parm
(list 'unquote parm)
(list 'eval parm)
instead, but this breaks interactive editing: e.g. typing '^' in math
mode doesn't make a superscript anymore, but a '^' character. The best
I could find is:
(tm-define (my-scheme-macro parm perm)
(:type (tree -> tree))
(:secure #t)
(with path (tree->path parm)
(display* "\nparm(" path ")\n"))
`(arg ,perm))
and call with:
<assign|self-path|<macro|x|<extern|my-scheme-macro|<quote-arg|x>|x>>>
Do you have a better solution?
Thanks for all your help,
--
Lionel
_______________________________________________
Texmacs-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/texmacs-dev