Add InsetMathClass to the list of math completions

This commit is contained in:
Guillaume Munch 2016-12-20 00:15:59 +01:00
parent ea7704a354
commit e02f287f8b
2 changed files with 12 additions and 4 deletions

View File

@ -203,6 +203,16 @@ textstyle style 2
scriptstyle style 1
scriptscriptstyle style 0
# math classes
mathord class none
mathop class none
mathbin class none
mathrel class none
mathopen class none
mathclose class none
mathpunct class none
mathinner class none
# misc
# The commented lines in this block get misparsed as MathSymbolInset because
# createMathInset() does not know them. I don't know if this is old cruft

View File

@ -459,6 +459,8 @@ MathAtom createInsetMath(docstring const & s, Buffer * buf)
return MathAtom(new InsetMathDecoration(buf, l));
if (inset == "space")
return MathAtom(new InsetMathSpace(to_ascii(l->name), ""));
if (inset == "class")
return MathAtom(new InsetMathClass(buf, string_to_class(s)));
if (inset == "dots")
return MathAtom(new InsetMathDots(l));
if (inset == "mbox")
@ -666,10 +668,6 @@ MathAtom createInsetMath(docstring const & s, Buffer * buf)
if (s == "regexp")
return MathAtom(new InsetMathHull(buf, hullRegexp));
MathClass const mc = string_to_class(s);
if (mc != MC_UNKNOWN)
return MathAtom(new InsetMathClass(buf, mc));
return MathAtom(new MathMacro(buf, s));
}