#include "Format.h"
#include "gettext.h"
#include "KeyMap.h"
+#include "CmdDef.h"
#include "Language.h"
#include "Session.h"
#include "Color.h"
///
boost::scoped_ptr<KeyMap> toplevel_keymap_;
///
+ boost::scoped_ptr<CmdDef> toplevel_cmddef_;
+ ///
boost::scoped_ptr<Server> lyx_server_;
///
boost::scoped_ptr<ServerSocket> lyx_socket_;
}
+CmdDef & LyX::topLevelCmdDef()
+{
+ BOOST_ASSERT(pimpl_->toplevel_cmddef_.get());
+ return *pimpl_->toplevel_cmddef_.get();
+}
+
+
Converters & LyX::converters()
{
return pimpl_->converters_;
continue;
Buffer * buf = pimpl_->buffer_list_.newBuffer(it->absFilename(), false);
- if (loadLyXFile(buf, *it)) {
+ if (buf->loadLyXFile(*it)) {
ErrorList const & el = buf->errorList("Parse");
if (!el.empty())
for_each(el.begin(), el.end(),
// Set the language defined by the user.
//setGuiLanguage(lyxrc.gui_language);
+ // Set up command definitions
+ pimpl_->toplevel_cmddef_.reset(new CmdDef);
+ pimpl_->toplevel_cmddef_->read(lyxrc.def_file);
+
// Set up bindings
pimpl_->toplevel_keymap_.reset(new KeyMap);
defaultKeyBindings(pimpl_->toplevel_keymap_.get());