aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorCharles A. Roelli2019-02-24 16:13:13 +0100
committerCharles A. Roelli2019-03-03 21:31:05 +0100
commitd6b3e5bbc5e14c32f3faad9f1481ec16807ac2fe (patch)
treed6c054f8db81eb0fbdaa90a4046703b6b28f2612 /doc
parent81ae21792b3d840a2f11e4c3a682e1e30799c37f (diff)
downloademacs-d6b3e5bbc5e14c32f3faad9f1481ec16807ac2fe.tar.gz
emacs-d6b3e5bbc5e14c32f3faad9f1481ec16807ac2fe.zip
Merge diff-font-lock-refine and diff-auto-refine-mode into diff-refine
This change was discussed in Bug#32991. * admin/gitmerge.el (gitmerge-resolve): Bind 'diff-refine' instead of 'diff-auto-refine-mode' to nil. * doc/emacs/files.texi (Diff Mode): Explain 'diff-refine' instead of 'diff-auto-refine-mode' in the documentation of 'diff-hunk-next' and 'diff-hunk-prev'. Mention in the documentation of 'diff-refine-hunk' that refining is already done by default. * etc/NEWS (Diff mode): Explain renamed 'diff-refine' variable and mention deprecation and disabling of 'diff-auto-refine-mode'. * lisp/vc/diff-mode.el (diff-font-lock-refine): Rename to 'diff-refine' and allow choices nil, 'font-lock' and 'navigation'. (diff-auto-refine-mode): Disable it by default, make it obsolete and make it set 'diff-refine' appropriately to keep backward compatibility. (diff-hunk-next, diff-hunk-prev): Adapt to rename of diff-auto-refine-mode and ensure that refining only happens when calling these commands interactively. (diff--font-lock-refined): Adapt to rename of diff-font-lock-refine. * lisp/vc/smerge-mode.el (smerge-next, smerge-prev): Check that 'diff-refine' is set instead of checking 'diff-auto-refine-mode' when deciding whether to refine a conflict.
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/files.texi28
1 files changed, 13 insertions, 15 deletions
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index d12d1edae72..a57428230cc 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -1461,26 +1461,19 @@ manipulate and apply parts of patches:
1461Move to the next hunk-start (@code{diff-hunk-next}). With prefix 1461Move to the next hunk-start (@code{diff-hunk-next}). With prefix
1462argument @var{n}, move forward to the @var{n}th next hunk. 1462argument @var{n}, move forward to the @var{n}th next hunk.
1463 1463
1464@findex diff-auto-refine-mode 1464@vindex diff-refine
1465@cindex mode, Diff Auto-Refine 1465By default, Diff mode @dfn{refines} hunks as Emacs displays them,
1466@cindex Diff Auto-Refine mode 1466highlighting their changes with better granularity. Alternatively, if
1467This command has a side effect: it @dfn{refines} the hunk you move to, 1467you set @code{diff-refine} to the symbol @code{navigation}, Diff mode
1468highlighting its changes with better granularity. To disable this 1468only refines the hunk you move to with this command or with
1469feature, type @kbd{M-x diff-auto-refine-mode} to toggle off the minor 1469@code{diff-hunk-prev}.
1470mode Diff Auto-Refine mode. To disable Diff Auto-Refine mode by
1471default, add this to your init file (@pxref{Hooks}):
1472
1473@example
1474(add-hook 'diff-mode-hook
1475 (lambda () (diff-auto-refine-mode -1)))
1476@end example
1477 1470
1478@item M-p 1471@item M-p
1479@findex diff-hunk-prev 1472@findex diff-hunk-prev
1480Move to the previous hunk-start (@code{diff-hunk-prev}). With prefix 1473Move to the previous hunk-start (@code{diff-hunk-prev}). With prefix
1481argument @var{n}, move back to the @var{n}th previous hunk. Like 1474argument @var{n}, move back to the @var{n}th previous hunk. Like
1482@kbd{M-n}, this has the side-effect of refining the hunk you move to, 1475@kbd{M-n}, this command refines the hunk you move to if you set
1483unless you disable Diff Auto-Refine mode. 1476@code{diff-refine} to the symbol @code{navigation}.
1484 1477
1485@item M-@} 1478@item M-@}
1486@findex diff-file-next 1479@findex diff-file-next
@@ -1518,6 +1511,11 @@ Highlight the changes of the hunk at point with a finer granularity
1518(@code{diff-refine-hunk}). This allows you to see exactly which parts 1511(@code{diff-refine-hunk}). This allows you to see exactly which parts
1519of each changed line were actually changed. 1512of each changed line were actually changed.
1520 1513
1514@vindex diff-refine
1515By default, Diff mode refines hunks as Emacs displays them, so you may
1516find this command useful if you customize @code{diff-refine} to a
1517non-default value.
1518
1521@item C-c C-c 1519@item C-c C-c
1522@findex diff-goto-source 1520@findex diff-goto-source
1523@vindex diff-jump-to-old-file 1521@vindex diff-jump-to-old-file