summaryrefslogtreecommitdiff
path: root/doc/emacs/files.texi
diff options
context:
space:
mode:
authorCharles A. Roelli <charles@aurox.ch>2019-02-24 16:13:13 +0100
committerCharles A. Roelli <charles@aurox.ch>2019-03-03 21:31:05 +0100
commitd6b3e5bbc5e14c32f3faad9f1481ec16807ac2fe (patch)
treed6c054f8db81eb0fbdaa90a4046703b6b28f2612 /doc/emacs/files.texi
parent81ae21792b3d840a2f11e4c3a682e1e30799c37f (diff)
downloademacs-d6b3e5bbc5e14c32f3faad9f1481ec16807ac2fe.tar.gz
emacs-d6b3e5bbc5e14c32f3faad9f1481ec16807ac2fe.tar.bz2
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/emacs/files.texi')
-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:
Move to the next hunk-start (@code{diff-hunk-next}). With prefix
argument @var{n}, move forward to the @var{n}th next hunk.
-@findex diff-auto-refine-mode
-@cindex mode, Diff Auto-Refine
-@cindex Diff Auto-Refine mode
-This command has a side effect: it @dfn{refines} the hunk you move to,
-highlighting its changes with better granularity. To disable this
-feature, type @kbd{M-x diff-auto-refine-mode} to toggle off the minor
-mode Diff Auto-Refine mode. To disable Diff Auto-Refine mode by
-default, add this to your init file (@pxref{Hooks}):
-
-@example
-(add-hook 'diff-mode-hook
- (lambda () (diff-auto-refine-mode -1)))
-@end example
+@vindex diff-refine
+By default, Diff mode @dfn{refines} hunks as Emacs displays them,
+highlighting their changes with better granularity. Alternatively, if
+you set @code{diff-refine} to the symbol @code{navigation}, Diff mode
+only refines the hunk you move to with this command or with
+@code{diff-hunk-prev}.
@item M-p
@findex diff-hunk-prev
Move to the previous hunk-start (@code{diff-hunk-prev}). With prefix
argument @var{n}, move back to the @var{n}th previous hunk. Like
-@kbd{M-n}, this has the side-effect of refining the hunk you move to,
-unless you disable Diff Auto-Refine mode.
+@kbd{M-n}, this command refines the hunk you move to if you set
+@code{diff-refine} to the symbol @code{navigation}.
@item M-@}
@findex diff-file-next
@@ -1518,6 +1511,11 @@ Highlight the changes of the hunk at point with a finer granularity
(@code{diff-refine-hunk}). This allows you to see exactly which parts
of each changed line were actually changed.
+@vindex diff-refine
+By default, Diff mode refines hunks as Emacs displays them, so you may
+find this command useful if you customize @code{diff-refine} to a
+non-default value.
+
@item C-c C-c
@findex diff-goto-source
@vindex diff-jump-to-old-file