GNU Emacs Manual - Undoing Changes Go to the previous , next section. Undoing Changes Emacs allows all changes made in the text of a buffer to be undone, up to a certain amount of change. Each buffer records changes individually, and the undo command always applies to the current buffer. The first time you give this command, it undoes the last change.
Point moves back to where it was before the command that made the change.
If all recorded changes have already been undone, the undo command prints an error message and does nothing. Any command other than an undo command breaks the sequence of undo commands. Starting at this moment, the previous undo commands are considered ordinary changes that can themselves be undone. Thus, you can redo changes you have undone by typing C-f or any other command that will have no important effect, and then using more undo commands. At this time, all the modifications you made have been cancelled.