[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 4d51c2c: Add new face diff-changed-unspecified
From: |
Lars Ingebrigtsen |
Subject: |
master 4d51c2c: Add new face diff-changed-unspecified |
Date: |
Fri, 13 Aug 2021 09:36:00 -0400 (EDT) |
branch: master
commit 4d51c2c472963d6330925c06d59f16de370c6474
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Add new face diff-changed-unspecified
* lisp/vc/diff-mode.el (diff-changed-unspecified): New face.
(diff-font-lock-keywords): Use it (bug#26969).
---
etc/NEWS | 4 ++++
lisp/vc/diff-mode.el | 19 +++++++++++++++----
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index 26ede71..b40c2bd 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2340,6 +2340,10 @@ a list.
** Diff
---
+*** New face 'diff-changed-unspecified'.
+This is used when 'diff-use-changed-face' is non-nil.
+
+---
*** New 'diff-mode' font locking face 'diff-error'.
This face is used for error messages from 'diff'.
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index 4652afa..1d838e6 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -357,6 +357,16 @@ well."
:foreground "green" :extend t))
"`diff-mode' face used to highlight added lines.")
+(defface diff-changed-unspecified
+ '((((class color) (min-colors 88) (background light))
+ :background "grey90")
+ (((class color) (min-colors 88) (background dark))
+ :background "grey20")
+ (((class color))
+ :foreground "grey"))
+ "`diff-mode' face used to highlight changed lines."
+ :version "28.1")
+
(defface diff-changed
'((t nil))
"`diff-mode' face used to highlight changed lines."
@@ -436,9 +446,10 @@ well."
(defvar diff-use-changed-face (and (face-differs-from-default-p 'diff-changed)
(not (face-equal 'diff-changed 'diff-added))
(not (face-equal 'diff-changed
'diff-removed)))
- "If non-nil, use the face `diff-changed' for changed lines in context diffs.
-Otherwise, use the face `diff-removed' for removed lines,
-and the face `diff-added' for added lines.")
+ "Controls how changed lines are fontified in context diffs.
+If non-nil, use the face `diff-changed-unspecified'. Otherwise,
+use the face `diff-removed' for removed lines, and the face
+`diff-added' for added lines.")
(defvar diff-font-lock-keywords
`((,(concat "\\(" diff-hunk-header-re-unified "\\)\\(.*\\)$")
@@ -470,7 +481,7 @@ and the face `diff-added' for added lines.")
diff-indicator-added-face
diff-indicator-removed-face)))))
(2 (if diff-use-changed-face
- 'diff-changed
+ 'diff-changed-unspecified
;; Otherwise, use the same method as above.
(save-match-data
(let ((limit (save-excursion (diff-beginning-of-hunk))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 4d51c2c: Add new face diff-changed-unspecified,
Lars Ingebrigtsen <=