This avoids the bv->owner()->dispatch() redirection.
Will commit soon. Abdel.
Index: lyxfunc.C =================================================================== --- lyxfunc.C (revision 15031) +++ lyxfunc.C (working copy) @@ -651,9 +651,7 @@ } -namespace { - -bool ensureBufferClean(BufferView * bv) +bool LyXFunc::ensureBufferClean(BufferView * bv) { Buffer & buf = *bv->buffer(); if (buf.isClean()) @@ -668,12 +666,14 @@ _("&Cancel")); if (ret == 0) - bv->owner()->dispatch(FuncRequest(LFUN_BUFFER_WRITE)); + dispatch(FuncRequest(LFUN_BUFFER_WRITE)); return buf.isClean(); } +namespace { + void showPrintError(string const & name) { docstring str = bformat(_("Could not print the document %1$s.\n" Index: lyxfunc.h =================================================================== --- lyxfunc.h (revision 15030) +++ lyxfunc.h (working copy) @@ -108,6 +108,8 @@ void doImport(std::string const &); /// void closeBuffer(); + /// + bool ensureBufferClean(BufferView * bv); }; #endif