]> git.lyx.org Git - features.git/commitdiff
\end_document replaces \the_end.
authorJosé Matox <jamatos@lyx.org>
Mon, 28 Jul 2003 22:30:50 +0000 (22:30 +0000)
committerJosé Matox <jamatos@lyx.org>
Mon, 28 Jul 2003 22:30:50 +0000 (22:30 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7430 a592a061-630c-0410-9148-cb99ea01b6c8

development/FORMAT
lib/ChangeLog
lib/lyx2lyx/lyxconvert_224.py
src/ChangeLog
src/buffer.C
src/insets/ChangeLog
src/insets/insettext.C
src/paragraph_funcs.C

index 79540c6053133b3af81c9952434c0dc30b4de8ca..2b4424145221ba0db3300da7f0e1790d021e251e 100644 (file)
@@ -1,6 +1,10 @@
 LyX file-format changes
 -----------------------
 
+2003-07-28  José Matos  <jamatos@lyx.org>
+
+       * \the_end is replaced with \end_document
+
 2003-07-28  José Matos  <jamatos@lyx.org>
 
        * \layout is replaced with \begin_layout
index e1092cf5b6d2d4588bf0d45f54b933a5174bbce8..73fc77f4e26b400b169f27605b42d3227fdfb494 100644 (file)
@@ -1,7 +1,12 @@
 2003-07-28  José Matos  <jamatos@lyx.org>
 
-       * lyx2lyx (parse_options): support gziped files.
-       * parser_tools.py (set_format): output correct version.
+       * lyx2lyx/lyxconvert_224.py (end_document):
+       replace \the_end with \end_document.
+
+2003-07-28  José Matos  <jamatos@lyx.org>
+
+       * lyx2lyx/lyx2lyx (parse_options): support gziped files.
+       * lyx2lyx/parser_tools.py (set_format): output correct version.
 
 2003-07-28  José Matos  <jamatos@fep.up.pt>
 
index a64fc7be2a30337f5af2f5982de4cc3429f4dc95..db4148f372f90fd1b1f2d0bcf48e0be708cca642 100644 (file)
@@ -78,9 +78,17 @@ def layout2begin_layout(lines):
         lines[i]= replace(lines[i], '\\layout', '\\begin_layout')
         i = i + 1
 
+def end_document(lines):
+    i = find_token(lines, "\\the_end", 0)
+    if i == -1:
+        lines.append("\\end_document")
+        return
+    lines[i] = "\\end_document"
+    
 def convert(header, body):
     add_end_layout(body)
     layout2begin_layout(body)
+    end_document(body)
 
 if __name__ == "__main__":
     pass
index 49b6ed8817a34bc3cb71a117da4a9af05f447e1b..19b6b481e2b2f5c8e70b7542f4aa591ad9adc66c 100644 (file)
@@ -1,3 +1,7 @@
+2003-07-28  José Matos  <jamatos@lyx.org>
+
+       * buffer.C (readBody, do_writeFile):
+       * paragraph.C(readParagraph): \end_document replaces \the_end.
 
 2003-07-29  André Pönitz  <poenitz@gmx.net>
 
index 95fc968d375c8d2270743c20eb010d1db5354636..3c82bc2f4845c3562e290b73b968cfaba156a061 100644 (file)
@@ -295,7 +295,7 @@ int Buffer::readHeader(LyXLex & lex)
 // changed to be public and have one parameter
 // if par = 0 normal behavior
 // else insert behavior
-// Returns false if "\the_end" is not read (Asger)
+// Returns false if "\end_document" is not read (Asger)
 bool Buffer::readBody(LyXLex & lex, ParagraphList::iterator pit)
 {
        Paragraph::depth_type depth = 0;
@@ -329,7 +329,7 @@ bool Buffer::readBody(LyXLex & lex, ParagraphList::iterator pit)
                lyxerr[Debug::PARSER] << "Handling token: `"
                                      << token << '\'' << endl;
 
-               if (token == "\\the_end") {
+               if (token == "\\end_document") {
                        the_end_read = true;
                        continue;
                }
@@ -698,7 +698,7 @@ bool Buffer::do_writeFile(ostream & ofs) const
                pit->write(this, ofs, params, depth);
 
        // Write marker that shows file is complete
-       ofs << "\n\\the_end" << endl;
+       ofs << "\n\\end_document" << endl;
 
        // Shouldn't really be needed....
        //ofs.close();
index be593a33a1bff7bbc04c9948759d1552ff6d4540..17bf4365035a9353fac773a767b013950015c9fe 100644 (file)
@@ -1,3 +1,7 @@
+2003-07-28  José Matos  <jamatos@lyx.org>
+
+       * insetext.C (read): \end_document replaces \the_end.
+
 2003-07-28  José Matos  <jamatos@fep.up.pt>
 
        * insetert.C (write): \layout -> \begin_layout.
index 1f22e6987e12903497ed5fed362c99e56f9a8b7a..78bb89071e290ff205c68048b367bec53a8d7550 100644 (file)
@@ -252,8 +252,8 @@ void InsetText::read(Buffer const * buf, LyXLex & lex)
                        break;
                }
 
-               if (token == "\\the_end") {
-                       lex.printError("\\the_end read in inset! Error in document!");
+               if (token == "\\end_document") {
+                       lex.printError("\\end_document read in inset! Error in document!");
                        return;
                }
 
index c3eaec30cde204ee2b95f9f81432c8565535d74e..916c8b666959d0dbe4f9535026a25958e4d86dfb 100644 (file)
@@ -988,7 +988,7 @@ int readParagraph(Buffer & buf, Paragraph & par, LyXLex & lex)
 
                lyxerr[Debug::PARSER] << "Handling paragraph token: `"
                                      << token << '\'' << endl;
-               if (token == "\\begin_layout" || token == "\\the_end"
+               if (token == "\\begin_layout" || token == "\\end_document"
                    || token == "\\end_inset" || token == "\\begin_deeper"
                    || token == "\\end_deeper") {
                        lex.pushToken(token);