change the way to get undo/redo doc for a group of commands