+/// this will undo the last action - returns false if no undo possible
+bool textUndo(BufferView &);
+
+/// this will redo the last undo - returns false if no redo possible
+bool textRedo(BufferView &);
+
+/// makes sure the next operation will be stored
+void finishUndo();
+
+/// whilst undo is frozen, all actions do not get added to the undo stack
+void freezeUndo();
+
+/// track undos again
+void unFreezeUndo();
+
+
+/**
+ * Record undo information - call with the current cursor and the 'other
+ * end' of the range of changed paragraphs. So we give an inclusive range.
+ * This is called before you make the changes to the paragraph, and it
+ * will record the original information of the paragraphs in the undo stack.
+ */
+
+/// the common case: prepare undo for an arbitrary range
+void recordUndo(LCursor & cur, Undo::undo_kind kind,
+ lyx::paroffset_type from, lyx::paroffset_type to);
+
+/// convienience: prepare undo for the range between 'from' and cursor.
+void recordUndo(LCursor & cur, Undo::undo_kind kind, lyx::paroffset_type from);
+
+/// convienience: prepare undo for the single paragraph containing the cursor
+void recordUndo(LCursor & cur, Undo::undo_kind kind);
+
+/// convienience: prepare undo for the single paragraph containing the cursor
+void recordUndoFullDocument(LCursor & cur);
+
+/// are we avoiding tracking undos currently?
+extern bool undo_frozen;
+
+#endif // UNDO_FUNCS_H