aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorDmitry Gutov2015-04-14 05:03:32 +0300
committerDmitry Gutov2015-04-14 05:06:49 +0300
commita9ccfaefc1ca8fa5b0177101984f64b3b186339b (patch)
tree70c652aeeb0b392d25702a1d75c531f449ed347e /doc
parente192281baae377a8702f3c048fce988d63ccfc1a (diff)
downloademacs-a9ccfaefc1ca8fa5b0177101984f64b3b186339b.tar.gz
emacs-a9ccfaefc1ca8fa5b0177101984f64b3b186339b.zip
Change diff-switches default to `-u'
Fixes: debbugs:20290 * doc/emacs/files.texi (Comparing Files): Document the new default value of `diff-switches'. * doc/emacs/trouble.texi (Sending Patches): Document the preference for unified diff format. Escape the plus in the suggested `-F' regexp value. * lisp/vc/diff.el (diff-switches): Change the default to `-u'.
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/files.texi2
-rw-r--r--doc/emacs/trouble.texi11
2 files changed, 6 insertions, 7 deletions
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index c4b0c11f68b..3a281d223b3 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -1272,7 +1272,7 @@ minibuffer, and displays the differences between the two files in a
1272buffer named @file{*diff*}. This works by running the @command{diff} 1272buffer named @file{*diff*}. This works by running the @command{diff}
1273program, using options taken from the variable @code{diff-switches}. 1273program, using options taken from the variable @code{diff-switches}.
1274The value of @code{diff-switches} should be a string; the default is 1274The value of @code{diff-switches} should be a string; the default is
1275@code{"-c"} to specify a context diff. 1275@code{"-u"} to specify a unified context diff.
1276@c Note that the actual name of the info file is diffutils.info, 1276@c Note that the actual name of the info file is diffutils.info,
1277@c but it adds a dir entry for diff too. 1277@c but it adds a dir entry for diff too.
1278@c On older systems, only "info diff" works, not "info diffutils". 1278@c On older systems, only "info diff" works, not "info diffutils".
diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi
index 2c3de28628e..42022cd14f6 100644
--- a/doc/emacs/trouble.texi
+++ b/doc/emacs/trouble.texi
@@ -743,7 +743,7 @@ unmodified Emacs. But if you've made modifications and you don't tell
743us, you are sending us on a wild goose chase.) 743us, you are sending us on a wild goose chase.)
744 744
745Be precise about these changes. A description in English is not 745Be precise about these changes. A description in English is not
746enough---send a context diff for them. 746enough---send a unified context diff for them.
747 747
748Adding files of your own, or porting to another machine, is a 748Adding files of your own, or porting to another machine, is a
749modification of the source. 749modification of the source.
@@ -1131,13 +1131,12 @@ is important.
1131@item 1131@item
1132The patch itself. 1132The patch itself.
1133 1133
1134Use @samp{diff -c} to make your diffs. Diffs without context are hard 1134Use @samp{diff -u} to make your diffs. Diffs without context are hard
1135to install reliably. More than that, they are hard to study; we must 1135to install reliably. More than that, they are hard to study; we must
1136always study a patch to decide whether we want to install it. Unidiff 1136always study a patch to decide whether we want to install it. Context
1137format is better than contextless diffs, but not as easy to read as 1137format is better than contextless diffs, but we prefer we unified format.
1138@samp{-c} format.
1139 1138
1140If you have GNU diff, use @samp{diff -c -F'^[_a-zA-Z0-9$]+ *('} when 1139If you have GNU diff, use @samp{diff -u -F'^[_a-zA-Z0-9$]\+ *('} when
1141making diffs of C code. This shows the name of the function that each 1140making diffs of C code. This shows the name of the function that each
1142change occurs in. 1141change occurs in.
1143 1142