There's a tension between 'editing content' commands and 'change UI' commands when undoing.
Usually you don't want to undo e.g. zooming, just edits. I've seen novices accidentally change UI and get stuck though.
Perhaps UI customisation should be minimised?
Thinking more about the "auto eval definitions" approach, I think it breaks down when debugging. If I want to step through the existing definition, it'd be really awkward to re-evaluate the definition at my cursor.