X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLyXRC.cpp;h=e7e7593908e1de9f33f09b4e389cf022f757ccb1;hb=02e59530b15d223c0978ecacfb7379f7bec986f4;hp=b7dd2250fefb9d0ff7d4b2e0c1d9d90464771297;hpb=4985015e8939df78a8d29c31aa04bc28caa3a47f;p=lyx.git diff --git a/src/LyXRC.cpp b/src/LyXRC.cpp index b7dd2250fe..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[] = { @@ -73,6 +73,7 @@ LexerKeyword lyxrcTags[] = { { "\\bind_file", LyXRC::RC_BINDFILE }, { "\\check_lastfiles", LyXRC::RC_CHECKLASTFILES }, { "\\chktex_command", LyXRC::RC_CHKTEX_COMMAND }, + { "\\close_buffer_with_last_view", LyXRC::RC_CLOSE_BUFFER_WITH_LAST_VIEW }, { "\\completion_cursor_text", LyXRC::RC_COMPLETION_CURSOR_TEXT }, { "\\completion_inline_delay", LyXRC::RC_COMPLETION_INLINE_DELAY }, { "\\completion_inline_dots", LyXRC::RC_COMPLETION_INLINE_DOTS }, @@ -210,7 +211,6 @@ LexerKeyword lyxrcTags[] = { { "\\viewer", LyXRC::RC_VIEWER}, { "\\viewer_alternatives", LyXRC::RC_VIEWER_ALTERNATIVES }, { "\\visual_cursor", LyXRC::RC_VISUAL_CURSOR }, - { "\\close_buffer_with_last_view", LyXRC::RC_CLOSE_BUFFER_WITH_LAST_VIEW }, { "format", LyXRC::RC_LYXRCFORMAT } }; @@ -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)