]> git.lyx.org Git - features.git/blobdiff - src/mathed/InsetMathMacro.cpp
Avoid spurious requirements
[features.git] / src / mathed / InsetMathMacro.cpp
index bf363b61db7c7d849bdaafffce2186b6151f864c..5743dd0e452b2a12311d51b8a512a9d285f4f1f5 100644 (file)
@@ -967,7 +967,16 @@ void InsetMathMacro::validate(LaTeXFeatures & features) const
 
        // validate the cells and the definition
        if (displayMode() == DISPLAY_NORMAL) {
-               d->definition_.validate(features);
+               // Don't update requirements if the macro comes from
+               // the symbols file and has not been redefined.
+               MathWordList const & words = mathedWordList();
+               MathWordList::const_iterator it = words.find(name());
+               MacroNameSet macros;
+               buffer().listMacroNames(macros);
+               if (it == words.end() || it->second.inset != "macro"
+                   || macros.find(name()) != macros.end()) {
+                       d->definition_.validate(features);
+               }
                InsetMathNest::validate(features);
        }
 }