Use define-derived-mode and define-minor-mode for undo-tree visualizer.