diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/emacs/files.texi | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 709cb0910e6..b7d6b6f9f7b 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -1682,6 +1682,21 @@ reverse of the hunk, which changes the ``new'' version into the ``old'' version. If @code{diff-jump-to-old-file} is non-@code{nil}, apply the hunk to the ``old'' version of the file instead. +@findex diff-revert-and-kill-hunk +@item C-c M-r +Reverse-apply this hunk to the target file, and then kill it +(@code{diff-revert-and-kill-hunk}). Save the buffer visiting the target +file. + +This command is useful in buffers generated by @w{@kbd{C-x v =}} and +@w{@kbd{C-x v D}} (@pxref{Old Revisions}). These buffers present you +with a view of the changes you've made, and then you can use this +command to drop changes you didn't intend, or no longer want. + +This is a destructive operation, so by default, this command asks you to +confirm you really want to reverse-apply and kill the hunk. You can +customize @code{diff-ask-before-revert-and-kill-hunk} to change that. + @findex diff-apply-buffer @item C-c @key{RET} a Apply all the hunks in the buffer (@code{diff-apply-buffer}). If the |