]> git.lyx.org Git - features.git/commitdiff
* use \long for \def macros (fixes http://bugzilla.lyx.org/show_bug.cgi?id=5371,...
authorStefan Schimanski <sts@lyx.org>
Tue, 21 Oct 2008 13:04:22 +0000 (13:04 +0000)
committerStefan Schimanski <sts@lyx.org>
Tue, 21 Oct 2008 13:04:22 +0000 (13:04 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27011 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/MathMacroTemplate.cpp

index c0af9f106f8ae1c4b0361665aa66af28076a5cc3..b00e4f9c89d7bd6387a060a661a4f9d1284fa029 100644 (file)
@@ -4,6 +4,7 @@
  * Licence details can be found in the file COPYING.
  *
  * \author André Pönitz
+ * \author Stefan Schimanski
  *
  * Full author contact details are available in file CREDITS.
  */
@@ -1136,6 +1137,7 @@ void MathMacroTemplate::write(WriteStream & os, bool overwriteRedefinition) cons
                if (optionals_ > 0) {
                        // macros with optionals use the xargs package, e.g.:
                        // \newcommandx{\foo}[2][usedefault, addprefix=\global,1=default]{#1,#2}
+                       // \long is implicit by xargs
                        if (redefinition_ && !overwriteRedefinition)
                                os << "\\renewcommandx";
                        else
@@ -1158,7 +1160,7 @@ void MathMacroTemplate::write(WriteStream & os, bool overwriteRedefinition) cons
                } else {
                        // macros without optionals use standard _global_ \def macros:
                        // \global\def\foo#1#2{#1,#2}
-                       os << "\\global\\def\\" << name();
+                       os << "\\global\\long\\def\\" << name();
                        docstring param = from_ascii("#0");
                        for (int i = 1; i <= numargs_; ++i) { 
                                param[1] = '0' + i;