X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLyXRC.cpp;h=e7e7593908e1de9f33f09b4e389cf022f757ccb1;hb=3d4076b598deb18660e50ec9c327efc3b15f15d0;hp=0d4c9197cc90cec6a47cf0dc1ca49018fe665e45;hpb=0b2c308a68d24015494c8705f24871f73983315d;p=lyx.git diff --git a/src/LyXRC.cpp b/src/LyXRC.cpp index 0d4c9197cc..e7e7593908 100644 --- a/src/LyXRC.cpp +++ b/src/LyXRC.cpp @@ -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)