diff options
| author | Charles A. Roelli | 2019-02-24 16:13:13 +0100 |
|---|---|---|
| committer | Charles A. Roelli | 2019-03-03 21:31:05 +0100 |
| commit | d6b3e5bbc5e14c32f3faad9f1481ec16807ac2fe (patch) | |
| tree | d6c054f8db81eb0fbdaa90a4046703b6b28f2612 /doc | |
| parent | 81ae21792b3d840a2f11e4c3a682e1e30799c37f (diff) | |
| download | emacs-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.texi | 28 |
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: | |||
| 1461 | Move to the next hunk-start (@code{diff-hunk-next}). With prefix | 1461 | Move to the next hunk-start (@code{diff-hunk-next}). With prefix |
| 1462 | argument @var{n}, move forward to the @var{n}th next hunk. | 1462 | argument @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 | 1465 | By default, Diff mode @dfn{refines} hunks as Emacs displays them, |
| 1466 | @cindex Diff Auto-Refine mode | 1466 | highlighting their changes with better granularity. Alternatively, if |
| 1467 | This command has a side effect: it @dfn{refines} the hunk you move to, | 1467 | you set @code{diff-refine} to the symbol @code{navigation}, Diff mode |
| 1468 | highlighting its changes with better granularity. To disable this | 1468 | only refines the hunk you move to with this command or with |
| 1469 | feature, type @kbd{M-x diff-auto-refine-mode} to toggle off the minor | 1469 | @code{diff-hunk-prev}. |
| 1470 | mode Diff Auto-Refine mode. To disable Diff Auto-Refine mode by | ||
| 1471 | default, 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 |
| 1480 | Move to the previous hunk-start (@code{diff-hunk-prev}). With prefix | 1473 | Move to the previous hunk-start (@code{diff-hunk-prev}). With prefix |
| 1481 | argument @var{n}, move back to the @var{n}th previous hunk. Like | 1474 | argument @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 |
| 1483 | unless 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 |
| 1519 | of each changed line were actually changed. | 1512 | of each changed line were actually changed. |
| 1520 | 1513 | ||
| 1514 | @vindex diff-refine | ||
| 1515 | By default, Diff mode refines hunks as Emacs displays them, so you may | ||
| 1516 | find this command useful if you customize @code{diff-refine} to a | ||
| 1517 | non-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 |