]> git.lyx.org Git - features.git/commit
Fix wrong mode on output for macros that shadow global macros
authorGuillaume Munch <gm@lyx.org>
Mon, 12 Dec 2016 00:17:41 +0000 (01:17 +0100)
committerGuillaume Munch <gm@lyx.org>
Tue, 3 Jan 2017 19:35:20 +0000 (20:35 +0100)
commit3e79e0f5f00add2c735d372f4734cf31f64b7e5f
treeae8beda458745772ebdb2346e48a260d465c1d28
parente35fda62a7f69e3278a2df5cfa4ec9fa103c5c65
Fix wrong mode on output for macros that shadow global macros

Testcase: Define a math macro \AA, overriding the definition of \AA from
lib/symbols, then insert it in math mode.

* Before this commit: \text{\AA}, and \lyxmathsym{\AA} after deleting \text, but
  displayed like \AA.

* After this commit: \text{\AA} is inserted, but one gets \AA after deleting
  \text. The output is now consistent with the display and the meaning.

* Expected: only \AA is inserted. This is unfortuately not what one gets; for
  this to work, the scope of the macros would need to be resolved upon creating
  the inset.
src/mathed/MathMacro.cpp
src/mathed/MathMacro.h