]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix a recent change in diff-mode.el
authorEli Zaretskii <eliz@gnu.org>
Sat, 24 Feb 2024 15:13:47 +0000 (17:13 +0200)
committerEshel Yaron <me@eshelyaron.com>
Wed, 28 Feb 2024 17:52:06 +0000 (18:52 +0100)
* lisp/vc/diff-mode.el (diff-refine-nonmodified): Doc fix.

* etc/NEWS: Improve wording.

(cherry picked from commit 3076e79a6a11f9df33c5bcaa7aa58955550aeef0)

etc/NEWS
lisp/vc/diff-mode.el

index 37c89a70c142ac8e8a835779aa676d95a451f4dd..dcf58159f4231be72a6d6dc65bc911a02c16026f 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -601,8 +601,11 @@ It allows tweaking the thresholds for rename and copy detection.
 
 ---
 *** New user option 'diff-refine-nonmodified'.
-Makes 'diff-refine' highlight added and removed whole lines with the
-same faces as the words added and removed within modified lines.
+When this is non-nil, 'diff-refine' will highlight lines that were added
+or removed in their entirety (as opposed to modified lines, where some
+parts of the line were modified), using the same faces as for
+highlighting the words added and removed within modified lines.  The
+default value is nil.
 
 +++
 *** 'diff-ignore-whitespace-hunk' can now be applied to all hunks.
index f914cc7679057be50736073dc821ce86e68e44ab..14a401667e953173b05b8e751d19ef2f0b4bc1ff 100644 (file)
@@ -2283,8 +2283,14 @@ Return new point, if it was moved."
     (overlay-put ol 'face face)))
 
 (defcustom diff-refine-nonmodified nil
-  "If non-nil also highlight as \"refined\" the added/removed lines.
-This is currently only implemented for `unified' diffs."
+  "If non-nil, also highlight the added/removed lines as \"refined\".
+The lines highlighted when this is non-nil are those that were
+added or removed in their entirety, as opposed to lines some
+parts of which were modified.  The added lines are highlighted
+using the `diff-refine-added' face, while the removed lines are
+highlighted using the `diff-refine-removed' face.
+This is currently implemented only for diff formats supported
+by `diff-refine-hunk'."
   :version "30.1"
   :type 'boolean)