Search code examples
emacscolorsflyspell

How to disable color in flyspell (emacs)?


I would like to prevent flyspell from changing the foreground color of words, and just add a red underline.

I've tried the suggestions here, but it doesn't have any effect: How to overlay a face in Emacs that ONLY modifies the underline. Perhaps I'm missunderstanding the answer, but setting inherit: undefined in the customize interface does nothing.

Guessing I should customize flyspell-duplicate and flyspell-incorrect, but how?


Solution

  • As suggested by @chakravarthy-raghunandan the issue was with a local customization.

    Turns out the theme I'm using set this, so my customizations were overwritten.

    Putting this in my init.el fixed the issue:

    (custom-theme-set-faces
     'cyberpunk
     '(flyspell-duplicate ((t (:weight bold :underline (:color "#ff0000" :style wave)))))
     '(flyspell-incorrect ((t (:weight bold :underline (:color "#ff0000" :style wave))))))