commit 6ac82190d2b179e82f99471c42fbe987cb803e07
Author: Enrico Forestieri <[email protected]>
Date: Fri Jul 4 01:01:51 2025 +0200
Amend 886025e6
At this point, the included file is already loaded, so the macros
have already been tracked by the parent and child->listMacroNames()
always returns an empty list. Thus, all that stanza is superfluous
and can be ditched. Most probably, this was a thinko in 8b88c3ed.
---
src/insets/InsetInclude.cpp | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp
index e2d9d8fd61..8486ee5924 100644
--- a/src/insets/InsetInclude.cpp
+++ b/src/insets/InsetInclude.cpp
@@ -506,17 +506,8 @@ Buffer * InsetInclude::loadIfNeeded() const
// FIXME: Do something.
}
} else {
- // The file was already loaded, so, simply inform
- // parent buffer about local macros (we don't need
- // to know the number of optional arguments here).
- Buffer const * parent = &buffer();
- child->setParent(parent);
- MacroNameSet macros;
- child->listMacroNames(macros);
- MacroNameSet::const_iterator cit = macros.begin();
- MacroNameSet::const_iterator end = macros.end();
- for (; cit != end; ++cit)
- parent->usermacros[*cit] = 0;
+ // The file was already loaded, so, simply set the parent
+ child->setParent(&buffer());
}
// Cache the child buffer.
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs