Stefan Schimanski wrote:
Hi!
Here is a proposal to fix the crash when you try to define macros with
self references, i.e. by using \foo inside of the definition of \foo
itself (or by any other definitional loop):
http://bugzilla.lyx.org/attachment.cgi?id=1548&action=view
It basically implements a locking counter in MacroData which is
increased before drawing an expanded macro and decreased afterwards.
Moreover inside of the arguments of the macro the counter is temporarily
decreased as those cases do not count as a loop. Any self reference is
rendered as "Self reference: foo". Maybe not the most elegant solution,
but it does the job until another clean implementation of the macros is
available.
What do you think Andre'?
Abdel.