+/** Helper class to simplify the use of undo groups across several buffers.
+ *
+ * The undo group is open when the object is instantiated or when
+ * the buffer is reset; it is then ended as the object goes out of
+ * scope (see below)
+ */
+class UndoGroupHelper {
+public:
+ // Begin a new undo group for buffer \c buf.
+ UndoGroupHelper(Buffer * buf);
+ // End all active undo groups.
+ ~UndoGroupHelper();
+
+ // Begin if needed an undo group for buffer \c buf.
+ void resetBuffer(Buffer * buf);
+
+private:
+ class Impl;
+ Impl * const d;
+};
+
+