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?

Drew
  • 75,699
  • 9
  • 109
  • 225
Todd
  • 201
  • 1
  • 8
  • 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. – Drew Feb 04 '23 at 04: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."* – Drew Feb 04 '23 at 04:21
  • I get "Wrong type argument: listp, quote" with face-remap-set-base. Is there a way to do what I want to do? – Todd Feb 04 '23 at 14:06

1 Answers1

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))
Todd
  • 201
  • 1
  • 8