diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 9003a49a95..0fff4f4157 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -2076,7 +2076,7 @@ void Buffer::writeParentMacros(odocstream & os) const MacroData const * data = d->parent_buffer->getMacro(*it, *this, false); if (data) - data->write(os, true); + data->write(os, true); } } diff --git a/src/mathed/MathMacroTemplate.cpp b/src/mathed/MathMacroTemplate.cpp index 85301fbfe0..b7ecb9bbc5 100644 --- a/src/mathed/MathMacroTemplate.cpp +++ b/src/mathed/MathMacroTemplate.cpp @@ -970,13 +970,13 @@ void MathMacroTemplate::write(WriteStream & os) const } -void MathMacroTemplate::write(WriteStream & os, bool /*overwriteRedefinition*/) const +void MathMacroTemplate::write(WriteStream & os, bool overwriteRedefinition) const { // newcommand or renewcommand if (os.latex() && optionals_ > 1) os << "\\newlyxcommand"; else { - if (redefinition_) + if (redefinition_ && !overwriteRedefinition) os << "\\renewcommand"; else os << "\\newcommand";