Go to the first, previous, next, last section, table of contents.

Undoing Mistakes

The shift-U key (calc-undo) undoes the most recent operation. If that operation added or dropped objects from the stack, those objects are removed or restored. If it was a "store" operation, you are queried whether or not to restore the variable to its original value. The U key may be pressed any number of times to undo successively farther back in time; with a numeric prefix argument it undoes a specified number of operations. The undo history is cleared only by the q (calc-quit) command. (Recall that M-# c is synonymous with calc-quit while inside the Calculator; this also clears the undo history.)

Currently the mode-setting commands (like calc-precision) are not undoable. You can undo past a point where you changed a mode, but you will need to reset the mode yourself.

The shift-D key (calc-redo) redoes an operation that was mistakenly undone. Pressing U with a negative prefix argument is equivalent to executing calc-redo. You can redo any number of times, up to the number of recent consecutive undo commands. Redo information is cleared whenever you give any command that adds new undo information, i.e., if you undo, then enter a number on the stack or make any other change, then it will be too late to redo.

The M-RET key (calc-last-args) is like undo in that it restores the arguments of the most recent command onto the stack; however, it does not remove the result of that command. Given a numeric prefix argument, this command applies to the nth most recent command which removed items from the stack; it pushes those items back onto the stack.

The K (calc-keep-args) command provides a related function to M-RET. See section Stack and Trail Commands.

It is also possible to recall previous results or inputs using the trail. See section Trail Commands.

The standard Emacs C-_ undo key is recognized as a synonym for U.


Go to the first, previous, next, last section, table of contents.