AtomicUndo (ne’s manual)

Previous: DoUndo, Up: Undo Commands [Contents][Index]

#### 4.7.5 AtomicUndo

Syntax: `AtomicUndo [0|+|-]`
Abbreviation: `AU`

increases, decreases, sets or clears the `AtomicUndo` level. The normal level is zero. All current document changes made while the `AtomicUndo` level is above zero are treated as a single change by the `Undo` and `Redo` commands. If no parameter is given, a level of 0 is set to 1; otherwise the current non-zero level is decremented. If 0 is given, the level is reset to zero. Parameters of ‘`+`’ and ‘`-`’ respectively increment and decrement the level, which in no case can be negative. If the level is above zero, the `DoUndo` flag in the status bar, which is normally a lower-case ‘`u`’, becomes upper case ‘`U`’.

Two other actions will reset the `AtomicUndo` level to zero: invoking the `Undo` command, and disabling the undo system with the `DoUndo` command. You cannot set a non-zero `AtomicUndo` level unless the undo system is enabled.

Note: macros that you wish to undo and redo atomically—i.e., as if they were single commands—should begin with `AtomicUndo +` and end with `AtomicUndo -` so that they can call and/or be called by other macros.