Le 01/04/2015 21:49, Georg Baum a écrit :
Jean-Marc Lasgouttes wrote:
Le 31/03/2015 21:38, Georg Baum a écrit :
BTW updateMacros is quite heavy on big documents (#5973) and I have
medium-term plans for making the update lazy. This may become
unnecessary if you can do another kind of miracle. My plan is to use
recordUndo to increment a version_id for the buffer. Therefore we can
know when macros really need to be updated.
I know that this needs work, but I don't see an obvious miracle:-(
Currently we also have the strange mixture of lazy and non-lazy macros.
What do you mean by lazy/non-lazy?
See src/mathed/MacroTable.h. There is one constructor of MacroData
documented as lazy, and one documented as non-lazy.
I see. My plan was just to skip Buffer::updateMacros() in general and
just execute it as needed whhen getMacro is invoked. But now I see the
mess in MacroData::expand and I do not understand anymore why there is a
need for another badly written loop that goes all over the buffer.
JMarc