else if (t.cs() == "def" ||
t.cs() == "newcommand" ||
- t.cs() == "renewcommand")
+ t.cs() == "renewcommand" ||
+ t.cs() == "newlyxcommand")
{
- docstring const type = t.cs();
+ MacroType type = MacroTypeNewcommand;
+ if (t.cs() == "def")
+ type = MacroTypeDef;
docstring name;
int nargs = 0;
int optionals = 0;
vector<MathData> optionalValues;
- if (t.cs() == "def") {
+ if (type == MacroTypeDef) {
// get name
name = getToken().cs();
nargs /= 2;
//lyxerr << "read \\def parameter list '" << pars << "'" << endl;
- } else { // t.cs() == "newcommand" || t.cs() == "renewcommand"
+ } else {
if (getToken().cat() != catBegin) {
error("'{' in \\newcommand expected (1) ");
return;