add dmacro. enable undo hist