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[] = {
{ "\\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 },
{ "\\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 }
};
}
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;
}
|| 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)
|| 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)