+ If 'newname' is non-empty and has an absolute path, that is used.
+ Otherwise the base directory of the buffer is used as the base
+ for any relative path in 'newname'.
+ */
+ bool renameBuffer(Buffer & b, docstring const & newname);
+ ///
+ bool saveBuffer(Buffer & b);
+ ///
+ bool closeWorkArea(GuiWorkArea * wa, bool close_buffer,
+ bool tolastopened = false, bool mark_active = false);
+ /// gives the user the possibility to save his work
+ /// or to discard the changes. If hiding is true, the
+ /// document will be reloaded.
+ bool saveBufferIfNeeded(Buffer & buf, bool hiding);