string build_lyxdir;
string system_tempdir;
string user_lyxdir; // Default $HOME/.lyx
-string help_lyxdir; // Default system_lyxdir/help
// Should this be kept global? Asger says Yes.
DebugStream lyxerr;
signal(SIGSEGV, SIG_DFL);
signal(SIGTERM, SIG_DFL);
- bufferlist.emergencyWriteAll();
+ LyX::emergencyCleanup();
lyxerr << "Bye." << endl;
if (err_sig!= SIGHUP &&
system_lyxdir = LYX_DIR;
path_shown = true;
}
- help_lyxdir = system_lyxdir+"help/";
// Report the system directory if debugging is on
if (!path_shown)
lyxerr[Debug::INIT] << "System directory: '"
}
+void LyX::emergencyCleanup()
+{
+ // what to do about tmpfiles is non-obvious. we would
+ // like to delete any we find, but our lyxdir might
+ // contain documents etc. which might be helpful on
+ // a crash
+
+ bufferlist.emergencyWriteAll();
+ if (lyxserver)
+ lyxserver->emergencyCleanup();
+}
+
+
// LyX can optionally take over the handling of deadkeys
void LyX::deadKeyBindings(kb_keymap * kbmap)
{