]> git.lyx.org Git - features.git/commitdiff
* Added Uwe's comment and a word about \global
authorStefan Schimanski <sts@lyx.org>
Tue, 21 Oct 2008 15:44:15 +0000 (15:44 +0000)
committerStefan Schimanski <sts@lyx.org>
Tue, 21 Oct 2008 15:44:15 +0000 (15:44 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27013 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/MathMacroTemplate.cpp

index b00e4f9c89d7bd6387a060a661a4f9d1284fa029..f27c8cdeff5c6dfaeb7f3fd4d6a1d088e735e726 100644 (file)
@@ -1158,8 +1158,10 @@ void MathMacroTemplate::write(WriteStream & os, bool overwriteRedefinition) cons
                        }
                        os << "]";
                } else {
-                       // macros without optionals use standard _global_ \def macros:
-                       // \global\def\foo#1#2{#1,#2}
+                       // Macros without optionals use standard _global_ \def macros:
+                       //   \global\def\long\foo#1#2{#1,#2}
+                       // We use the \long prefix as this is the equivalent to \newcommand.
+                       // We cannot use \newcommand directly because \global does not work with it.
                        os << "\\global\\long\\def\\" << name();
                        docstring param = from_ascii("#0");
                        for (int i = 1; i <= numargs_; ++i) {