]> git.lyx.org Git - features.git/blobdiff - src/LyXRC.cpp
cosmetics
[features.git] / src / LyXRC.cpp
index be650c3a7447d04bcbe6e819edf3bc7e87beb706..b8becc0689207c104b27680d13c7d9b5847e0124 100644 (file)
 
 #include "Color.h"
 #include "Converter.h"
+#include "FontEnums.h"
 #include "Format.h"
-#include "Session.h"
 #include "Lexer.h"
-#include "FontEnums.h"
 #include "Mover.h"
+#include "Session.h"
+#include "version.h"
 
 #include "graphics/GraphicsTypes.h"
 
@@ -381,15 +382,13 @@ int LyXRC::read(Lexer & lexrc)
 
                int le = lexrc.lex();
                switch (le) {
-                       case Lexer::LEX_UNDEF:
-                               // dro[ obsolete tag
-                               if (lexrc.getString() != "\\plaintest_roff_command")
-                                       lexrc.printError("Unknown tag `$$Token'");
-                               continue;
-                       case Lexer::LEX_FEOF:
-                               continue;
-                       default:
-                               break;
+               case Lexer::LEX_UNDEF:
+                       lexrc.printError("Unknown tag `$$Token'");
+                       continue;
+               case Lexer::LEX_FEOF:
+                       continue;
+               default:
+                       break;
                }
                switch (static_cast<LyXRCTags>(le)) {
                case RC_INPUT: // Include file
@@ -827,7 +826,7 @@ int LyXRC::read(Lexer & lexrc)
                        break;
 
                case RC_PLAINTEXT_ROFF_COMMAND: 
-                       (void) lexrc.getString(); // Obsoleted in 1.7
+                       (void) lexrc.getString(); // Obsoleted in 2.0
                        break;
                case RC_PLAINTEXT_LINELEN:
                        lexrc >> plaintext_linelen;
@@ -1076,11 +1075,8 @@ int LyXRC::read(Lexer & lexrc)
                        lexrc >> open_buffers_in_tabs;
                        break;
 
-               // Obsoleted in 1.7
+               // Obsoleted in 2.0
                case RC_SPELL_COMMAND:
-                       (void) lexrc.getString();
-                       break;
-               // Obsoleted in 1.7
                case RC_USE_SPELL_LIB:
                        (void) lexrc.getString();
                        break;
@@ -1155,8 +1151,9 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
        }
 
        if (tag == RC_LAST)
-               os << "# This file is written by LyX, if you want to make your own\n"
-                  << "# modifications you should do them from inside LyX and save\n"
+               os << "# LyX " << lyx_version
+                  << " generated this file. If you want to make your own\n"
+                  << "# modifications you should do them from inside LyX and save.\n"
                   << "\n";
 
        // Why the switch you might ask. It is a trick to ensure that all
@@ -2046,7 +2043,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
                if (tag != RC_LAST)
                        break;
                // Ignore it
-       case RC_PLAINTEXT_ROFF_COMMAND: // Obsoleted in 1.7
+       case RC_PLAINTEXT_ROFF_COMMAND: // Obsoleted in 2.0
                if (tag != RC_LAST)
                        break;
        case RC_PLAINTEXT_LINELEN:
@@ -2080,9 +2077,10 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
                   << "# SPELLCHECKER SECTION ##############################\n"
                   << "#\n\n";
        case RC_SPELL_COMMAND:
-               // Obsoleted in 1.7
        case RC_USE_SPELL_LIB:
-               // Obsoleted in 1.7
+               // Obsoleted in 2.0
+               if (tag != RC_LAST)
+                       break;
        case RC_ACCEPT_COMPOUND:
                if (ignore_system_lyxrc ||
                    spellchecker_accept_compound != system_lyxrc.spellchecker_accept_compound) {