On 05/03/2011 09:48 PM, Enrico Forestieri wrote:
> On Fri, Apr 29, 2011 at 05:17:33PM +0200, Peter Kümmel wrote:
>>
>> Yes, we also don't need threads.
> I am glad that you also agree on that. Please, now try fixing
> http://www.lyx.org/trac/ticket/7525
>
Well, I can't resist a challenge....

The attached patch fixes the reported problem. I'm not sure it's the
right thing to do, though.

The problem here was that we weren't collecting the macros before
validating. But I would have thought we should do all the update
routines (updateBuffer, updateMacroInstances) in writeLaTeXSource (and
writeXHTMLSource, etc) BEFORE we validate the Buffer. If so, then we do
not also need to do it in doExport(), or so I'd have thought, since we
always end up in one of these other routines.

Richard

Index: src/Buffer.cpp
===================================================================
--- src/Buffer.cpp	(revision 38567)
+++ src/Buffer.cpp	(working copy)
@@ -3522,6 +3522,7 @@
 	filename = changeExtension(filename,
 				   formats.extension(backend_format));
 
+	updateMacros();
 	// fix macros
 	updateMacroInstances();
 
Index: lib/lyx2lyx/LyX.py
===================================================================
--- lib/lyx2lyx/LyX.py	(revision 38567)
+++ lib/lyx2lyx/LyX.py	(working copy)
@@ -32,7 +32,7 @@
     import lyx2lyx_version
     version__ = lyx2lyx_version.version
 except: # we are running from build directory so assume the last version
-    version__ = '2.0'
+    version__ = '2.1'
 
 default_debug__ = 2
 
@@ -80,8 +80,9 @@
                    ("1_3",     [221], minor_versions("1.3" , 7)),
                    ("1_4", range(222,246), minor_versions("1.4" , 5)),
                    ("1_5", range(246,277), minor_versions("1.5" , 7)),
-                   ("1_6", range(277,346), minor_versions("1.6" , 0)),
-                   ("2_0",     [],    minor_versions("2.0", 0))]
+                   ("1_6", range(277,346), minor_versions("1.6" , 10)),
+                   ("2_0", range(347,413), minor_versions("2.0", 0)),
+                   ("2_1",     [], minor_versions("2.1", 0))]
 
 ####################################################################
 # This is useful just for development versions                     #

Reply via email to