Restore state of buffer in errors

When a error occurs it is important to remove all the modifications
done by the offending command and restore the value of dot to the
state before of executing the command.
1 file changed