MacroData const * Buffer::getMacro(docstring const & name,
Buffer const & child, bool global) const
{
- // look where the child buffer is included first
+ // find out where the child buffer is first included
Impl::BufferPositionMap::iterator it = d->children_positions.find(&child);
if (it == d->children_positions.end()) {
if (d->file_fully_loaded)
size_t optionals_;
/// fold mode to be set in next metrics call?
bool nextFoldMode_;
- /// if macro_ == true, then here is a copy of the macro
+ /// here is a copy of the macro, for safety purposes
/// don't use it for locking
MacroData macroBackup_;
- /// if macroNotFound_ == false, then here is a reference to the macro
/// this might invalidate after metrics was called
MacroData const * macro_;
///
// get default values of macro
vector<docstring> const & defaults = d->macro_->defaults();
- // create MathMacroArgumentValue objects pointing to the cells of the macro
+ // create InsetArgumentProxy objects pointing to the cells of the macro
vector<MathData> values(nargs());
for (size_t i = 0; i < nargs(); ++i) {
InsetArgumentProxy * proxy;
// InsetMathMacro objects, so this would be a different recursion path
// than the one protected by UpdateLocker.
docstring const & display = d->macro_->display();
- docstring const latexname = from_ascii("\\") + macroName();
bool const ret = d->macro_->expand(values, d->expanded_);
d->expanded_.setBuffer(buffer());
+ docstring const latexname = from_ascii("\\") + macroName();
if (ret && !support::contains(display, latexname)) {
if (utype == OutputUpdate && !d->expanded_.empty())
d->expanded_.updateMacroInstances(cur, mc, utype, nesting);