GNU Emacs Manual - Undo Go to the first , previous , next , last section, table of contents . Undoing Changes You can undo all the recent changes in the buffer text, up to a certain point. 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 from that moment, the previous undo commands become ordinary changes that you can undo. Thus, to redo changes you have undone, type C-f or any other command that will harmlessly break the sequence of undoing, then type more undo commands. Ordinary undo applies to all changes made in the current buffer.