summaryrefslogtreecommitdiff
path: root/lisp/vc/ediff-init.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/vc/ediff-init.el')
-rw-r--r--lisp/vc/ediff-init.el50
1 files changed, 33 insertions, 17 deletions
diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el
index 6e658163b91..17c4202d647 100644
--- a/lisp/vc/ediff-init.el
+++ b/lisp/vc/ediff-init.el
@@ -25,6 +25,7 @@
;;; Code:
(require 'cl-lib)
+(require 'ediff-util)
;; Start compiler pacifier
(defvar ediff-metajob-name)
@@ -980,8 +981,10 @@ this variable represents.")
(defface ediff-even-diff-A
`((((type pc))
(:foreground "green3" :background "light grey" :extend t))
- (((class color) (min-colors 88))
- (:background "light grey" :extend t))
+ (((class color) (min-colors 88) (background light))
+ (:distant-foreground "Black" :background "light grey" :extend t))
+ (((class color) (min-colors 88) (background dark))
+ (:distant-foreground "White" :background "dark grey" :extend t))
(((class color) (min-colors 16))
(:foreground "Black" :background "light grey" :extend t))
(((class color))
@@ -999,8 +1002,10 @@ widget to customize the actual face object `ediff-even-diff-A'
this variable represents.")
(defface ediff-even-diff-B
- `((((class color) (min-colors 88))
- (:background "Grey" :extend t))
+ `((((class color) (min-colors 88) (background light))
+ (:distant-foreground "Black" :background "Grey" :extend t))
+ (((class color) (min-colors 88) (background dark))
+ (:distant-foreground "White" :background "dim grey" :extend t))
(((class color) (min-colors 16))
(:foreground "White" :background "Grey" :extend t))
(((class color))
@@ -1019,8 +1024,10 @@ this variable represents.")
(defface ediff-even-diff-C
`((((type pc))
(:foreground "yellow3" :background "light grey" :extend t))
- (((class color) (min-colors 88))
- (:background "light grey" :extend t))
+ (((class color) (min-colors 88) (background light))
+ (:distant-foreground "Black" :background "light grey" :extend t))
+ (((class color) (min-colors 88) (background dark))
+ (:distant-foreground "White" :background "dark grey" :extend t))
(((class color) (min-colors 16))
(:foreground "Black" :background "light grey" :extend t))
(((class color))
@@ -1040,8 +1047,10 @@ this variable represents.")
(defface ediff-even-diff-Ancestor
`((((type pc))
(:foreground "cyan3" :background "light grey" :extend t))
- (((class color) (min-colors 88))
- (:background "Grey" :extend t))
+ (((class color) (min-colors 88) (background light))
+ (:distant-foreground "Black" :background "Grey" :extend t))
+ (((class color) (min-colors 88) (background dark))
+ (:distant-foreground "White" :background "dim grey" :extend t))
(((class color) (min-colors 16))
(:foreground "White" :background "Grey" :extend t))
(((class color))
@@ -1068,8 +1077,10 @@ this variable represents.")
(defface ediff-odd-diff-A
'((((type pc))
(:foreground "green3" :background "gray40" :extend t))
- (((class color) (min-colors 88))
- (:background "Grey" :extend t))
+ (((class color) (min-colors 88) (background light))
+ (:distant-foreground "Black" :background "Grey" :extend t))
+ (((class color) (min-colors 88) (background dark))
+ (:distant-foreground "White" :background "dim grey" :extend t))
(((class color) (min-colors 16))
(:foreground "White" :background "Grey" :extend t))
(((class color))
@@ -1088,8 +1099,10 @@ this variable represents.")
(defface ediff-odd-diff-B
'((((type pc))
(:foreground "White" :background "gray40" :extend t))
- (((class color) (min-colors 88))
- (:background "light grey" :extend t))
+ (((class color) (min-colors 88) (background light))
+ (:distant-foreground "Black" :background "light grey" :extend t))
+ (((class color) (min-colors 88) (background dark))
+ (:distant-foreground "White" :background "dark grey" :extend t))
(((class color) (min-colors 16))
(:foreground "Black" :background "light grey" :extend t))
(((class color))
@@ -1108,8 +1121,10 @@ this variable represents.")
(defface ediff-odd-diff-C
'((((type pc))
(:foreground "yellow3" :background "gray40" :extend t))
- (((class color) (min-colors 88))
- (:background "Grey" :extend t))
+ (((class color) (min-colors 88) (background light))
+ (:distant-foreground "Black" :background "Grey" :extend t))
+ (((class color) (min-colors 88) (background dark))
+ (:distant-foreground "White" :background "dim grey" :extend t))
(((class color) (min-colors 16))
(:foreground "White" :background "Grey" :extend t))
(((class color))
@@ -1167,8 +1182,8 @@ this variable represents.")
(put ediff-fine-diff-face-Ancestor 'ediff-help-echo
"A `refinement' of the current difference region")
-(add-hook 'ediff-quit-hook 'ediff-cleanup-mess)
-(add-hook 'ediff-suspend-hook 'ediff-default-suspend-function)
+(add-hook 'ediff-quit-hook #'ediff-cleanup-mess)
+(add-hook 'ediff-suspend-hook #'ediff-default-suspend-function)
;;; Overlays
@@ -1298,7 +1313,8 @@ This default should work without changes."
(defun ediff-paint-background-regions-in-one-buffer (buf-type unhighlight)
(let ((diff-vector
(eval (ediff-get-symbol-from-alist
- buf-type ediff-difference-vector-alist)))
+ buf-type ediff-difference-vector-alist)
+ t))
overl diff-num)
(mapcar (lambda (rec)
(setq overl (ediff-get-diff-overlay-from-diff-record rec)