]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathFactory.cpp
Fix wrong mode on output for macros that shadow global macros
[lyx.git] / src / mathed / MathFactory.cpp
index f00093746f8ca73f37b3ac80d9cc4cff473cb690..12817a35e48af9c412b7e966f2a44f00abdfa0c5 100644 (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")
@@ -495,7 +497,7 @@ MathAtom createInsetMath(docstring const & s, Buffer * buf)
                return MathAtom(new InsetMathMakebox(buf, true));
        if (s == "makebox")
                return MathAtom(new InsetMathMakebox(buf, false));
-       if (s == "kern")
+       if (s == "kern" || s == "mkern")
                return MathAtom(new InsetMathKern);
        if (s.substr(0, 8) == "xymatrix") {
                char spacing_code = '\0';
@@ -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));
 }