--- files.texi 06 Mar 2006 22:56:44 -0500 1.133 +++ files.texi 07 Mar 2006 18:27:41 -0500 @@ -2999,7 +2999,87 @@ @cindex patches Differences between versions of files are often distributed as patches, which are the output from the @command{diff} program. You -can use Diff mode to operate on a patch by typing @kbd{M-x diff-mode}. +can use the same Diff mode to operate on a patch by typing @kbd{M-x +diff-mode}. Any manual edits you make to a patch with Diff mode will +automatically correct the hunk header including insert, delete and +file line numbers. Also, the following commands help to navigate, +manipulate and apply patches in Diff mode: + address@hidden @kbd address@hidden M-n address@hidden diff-hunk-next +Move to the next hunk in the patch. + address@hidden M-p address@hidden diff-hunk-prev +Move to the previous hunk in the patch. + address@hidden address@hidden address@hidden diff-file-next +Move to the next file hunk in a multiple file patch. + address@hidden address@hidden address@hidden diff-file-prev +Move to the previous file hunk in a multiple file patch. + address@hidden M-k address@hidden diff-hunk-kill +Kill the current hunk at point. + address@hidden M-K address@hidden diff-file-kill +In a patch with multiple files, kill the current patch to a file. + address@hidden C-c C-s address@hidden diff-split-hunk +Split the hunk at point. This is useful when manually editing a patch +and only works with the unified diff format. + address@hidden C-c C-r address@hidden diff-refine-hunk +Recomputes the current hunk by ignoring changes in whitespace. + address@hidden M-R address@hidden diff-reverse-direction +Convert the patch to a patch that reverts. address@hidden Patches, Applying Reversed Patches, Patch, diff, +Comparing and Merging Files}. + address@hidden M-U address@hidden diff-context->unified +Convert the patch to the unified diff format. address@hidden Format, Unified Format, Diff, diff, +Comparing and Merging Files}. + address@hidden M-C address@hidden diff-unified->context +Convert the patch back to context diff format. address@hidden Format, Context Format, Diff, diff, +Comparing and Merging Files}. + address@hidden M-r address@hidden diff-restrict-view address@hidden widen +Restrict the view to the current hunk. @xref{Narrowing}. With a +prefix argument of @kbd{C-u} restrict the view to the current patch of +a multiple file patch. The view can be widened again with @kbd{M-W}. + address@hidden C-c C-a address@hidden diff-apply-hunk +Apply hunk to target file. With a prefix argument of @kbd{C-u}, apply +the reverse of the hunk. + address@hidden M-A address@hidden diff-ediff-patch +Start an Ediff session with the patch. address@hidden, Ediff, Ediff, ediff, The Ediff Manual}. + address@hidden C-x 4 a +Add a new entry to the change log for the current file. @xref{Change +Log}. This is useful for log entries for functions that are deleted +by the patch. + address@hidden table @findex compare-windows The command @kbd{M-x compare-windows} compares the text in the