diff options
| author | Dmitry Gutov | 2015-04-14 05:03:32 +0300 |
|---|---|---|
| committer | Dmitry Gutov | 2015-04-14 05:06:49 +0300 |
| commit | a9ccfaefc1ca8fa5b0177101984f64b3b186339b (patch) | |
| tree | 70c652aeeb0b392d25702a1d75c531f449ed347e /doc | |
| parent | e192281baae377a8702f3c048fce988d63ccfc1a (diff) | |
| download | emacs-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.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/trouble.texi | 11 |
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 | |||
| 1272 | buffer named @file{*diff*}. This works by running the @command{diff} | 1272 | buffer named @file{*diff*}. This works by running the @command{diff} |
| 1273 | program, using options taken from the variable @code{diff-switches}. | 1273 | program, using options taken from the variable @code{diff-switches}. |
| 1274 | The value of @code{diff-switches} should be a string; the default is | 1274 | The 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 | |||
| 743 | us, you are sending us on a wild goose chase.) | 743 | us, you are sending us on a wild goose chase.) |
| 744 | 744 | ||
| 745 | Be precise about these changes. A description in English is not | 745 | Be precise about these changes. A description in English is not |
| 746 | enough---send a context diff for them. | 746 | enough---send a unified context diff for them. |
| 747 | 747 | ||
| 748 | Adding files of your own, or porting to another machine, is a | 748 | Adding files of your own, or porting to another machine, is a |
| 749 | modification of the source. | 749 | modification of the source. |
| @@ -1131,13 +1131,12 @@ is important. | |||
| 1131 | @item | 1131 | @item |
| 1132 | The patch itself. | 1132 | The patch itself. |
| 1133 | 1133 | ||
| 1134 | Use @samp{diff -c} to make your diffs. Diffs without context are hard | 1134 | Use @samp{diff -u} to make your diffs. Diffs without context are hard |
| 1135 | to install reliably. More than that, they are hard to study; we must | 1135 | to install reliably. More than that, they are hard to study; we must |
| 1136 | always study a patch to decide whether we want to install it. Unidiff | 1136 | always study a patch to decide whether we want to install it. Context |
| 1137 | format is better than contextless diffs, but not as easy to read as | 1137 | format is better than contextless diffs, but we prefer we unified format. |
| 1138 | @samp{-c} format. | ||
| 1139 | 1138 | ||
| 1140 | If you have GNU diff, use @samp{diff -c -F'^[_a-zA-Z0-9$]+ *('} when | 1139 | If you have GNU diff, use @samp{diff -u -F'^[_a-zA-Z0-9$]\+ *('} when |
| 1141 | making diffs of C code. This shows the name of the function that each | 1140 | making diffs of C code. This shows the name of the function that each |
| 1142 | change occurs in. | 1141 | change occurs in. |
| 1143 | 1142 | ||