1

I'm trying to set my ediff faces to reuse some of the magit faces. The ediff colors are not very good in the dark mode I'm using. But I'm getting an error about compatibility. I found this error message in custom.el.

ediff/:config: Incompatible Custom theme spec

See this face-remap-set-base discussion for why I was trying face-all-attributes.

(custom-set-faces 'ediff-current-diff-face-A 'magit-diff-removed-highlight) (custom-set-faces 'ediff-current-diff-face-A (face-all-attributes 'magit-diff-removed-highlight)) (face-remap-set-base 'ediff-current-diff-face-B (face-all-attributes 'magit-diff-added-highlight)) 

I don't understand where theme is coming from. I don't see it in the ediff or magit files that define the faces. The ediff and magit faces define a different number of classes. Is this related to the error? Is there some way I can make this work?

3
  • The doc of custom-set-faces and of custom-theme-set-faces to which it refers, doesn't seem to describe arguments such as what you've provided. E.g., custom-set-faces takes any number of args, each of which has the form (FACE SPEC [NOW [COMMENT]]). Instead, you've passed it either a face symbol or a list of face attributes. The arg you pass to face-remap-set-base looks OK, though. custom-set-faces doesn't take the same kinds of arguments that face-remap-set-base takes, according to their doc. Commented Feb 4, 2023 at 4:19
  • As for "where the theme is coming from", the doc of custom-set-faces says "This works by calling custom-theme-set-faces for the user theme." Commented Feb 4, 2023 at 4:21
  • I get "Wrong type argument: listp, quote" with face-remap-set-base. Is there a way to do what I want to do? Commented Feb 4, 2023 at 14:06

1 Answer 1

1

This answer on this reddit post seems to work.

(when (featurep 'magit) (set-face-attribute 'ediff-current-diff-A nil :inherit 'magit-diff-removed-highlight) (set-face-attribute 'ediff-current-diff-B nil :inherit 'magit-diff-removed-highlight)) 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.