]> git.lyx.org Git - lyx.git/blobdiff - src/LyXRC.cpp
Natbib authoryear uses (Ref1; Ref2) by default.
[lyx.git] / src / LyXRC.cpp
index 0d4c9197cc90cec6a47cf0dc1ca49018fe665e45..e7e7593908e1de9f33f09b4e389cf022f757ccb1 100644 (file)
@@ -55,7 +55,7 @@ namespace os = support::os;
 
 namespace {
 
-static unsigned int const LYXRC_FILEFORMAT = 9; // spitz: remove \\default_language
+static unsigned int const LYXRC_FILEFORMAT = 11; // gb: Split pdf format into pdf and pdf6
 
 // when adding something to this array keep it sorted!
 LexerKeyword lyxrcTags[] = {
@@ -1143,19 +1143,15 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format)
                }
                case RC_VIEWER_ALTERNATIVES:  {
                        string format, command;
-                       if (lexrc.next())
-                               format = lexrc.getString();
-                       if (lexrc.eatLine())
-                               command = lexrc.getString();
+                       lexrc >> format;
+                       lexrc >> command;
                        viewer_alternatives[format].insert(command);
                        break;
                }
                case RC_EDITOR_ALTERNATIVES:  {
                        string format, command;
-                       if (lexrc.next())
-                               format = lexrc.getString();
-                       if (lexrc.eatLine())
-                               command = lexrc.getString();
+                       lexrc >> format;
+                       lexrc >> command;
                        editor_alternatives[format].insert(command);
                        break;
                }
@@ -2764,7 +2760,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
                                    || sysfmt == sysend               // format not found
                                         || sysfmt->second.count(cmd) == 0 // this command not found
                                   )
-                                       os << "\\viewer_alternatives " << fmt << " " << cmd << "\n";
+                                       os << "\\viewer_alternatives " << fmt << " \"" << escapeCommand(cmd) << "\"\n";
                        }
                }
                if (tag != RC_LAST)
@@ -2789,7 +2785,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
                                    || sysfmt == sysend               // format not found
                                    || sysfmt->second.count(cmd) == 0 // this command not found
                                   )
-                                       os << "\\editor_alternatives " << fmt << " " << cmd << "\n";
+                                       os << "\\editor_alternatives " << fmt << " \"" << escapeCommand(cmd) << "\"\n";
                        }
                }
                if (tag != RC_LAST)