From c0e720cdd97b28d532f4deb66861518a70d062ac Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 13 Aug 2019 18:16:51 +0300 Subject: [PATCH] Improve documentation of 'diff-font-lock-prettify' * lisp/vc/diff-mode.el (diff-font-lock-prettify): Doc fix. * etc/NEWS: Minor copyedits. --- etc/NEWS | 6 ++++++ lisp/vc/diff-mode.el | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index e8618152ed9..b9e9e28db4b 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -734,6 +734,10 @@ With a prefix argument asks for a command, so for example, 'C-u M-x vc-log-search RET git log -1 f302475 RET' will display just one log entry found by its revision number. +*** 'C-x v =' can now mimic Magit's diff format. +Set the new user option 'diff-font-lock-prettify' to t for that, see +below under "Diff mode". + ** Diff mode +++ *** Hunks are now automatically refined by font-lock. @@ -754,6 +758,8 @@ according to the appropriate major mode. Customize the new option *** File headers can be shortened, mimicking Magit's diff format. To enable it, set the new user option 'diff-font-lock-prettify' to t. +On GUI frames, this option also displays the insertion and deletion +indicators on the left fringe. +++ *** Prefix arg of 'diff-goto-source' means jump to the old revision diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index c4812e81d40..19f9c802d40 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -109,7 +109,11 @@ You can always manually refine a hunk with `diff-refine-hunk'." (const :tag "Refine hunks during navigation" navigation))) (defcustom diff-font-lock-prettify nil - "If non-nil, font-lock will try and make the format prettier." + "If non-nil, font-lock will try and make the format prettier. + +This mimics the Magit's diff format by making the hunk header +less cryptic, and on GUI frames also displays insertion and +deletion indicators on the left fringe (if it's available)." :version "27.1" :type 'boolean) -- 2.39.2