Andre Poenitz wrote:
On Mon, Apr 16, 2007 at 04:53:44PM +0200, Abdelrazak Younes wrote:
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'?

The idea looks sound.

However, the style is off. if statements on one line, passing of
docstrings by value.

If that's corrected and somebody verifies that it fixes the bug (which
it looks like...) it can go in.

Thanks.

Stefan, could you please update your patch with Andre's comment?

Abdel.

Reply via email to