Subject: bug#56679: 28.1; whitespace-style cannot be configured for diff-mode via hook

From: Michael Heerdegen <[email-masked]>
Date: Sat, 23 Jul 2022 02:15:39 +0200

YE via "Bug reports for GNU Emacs, the Swiss army knife of text editors"
<[email-masked]> writes:

> Or maybe adding a defcustom 'diff-whitespace-style' would be a proper
> solution here?

Since `diff-setup-whitespace' unconditionally sets whitespace-style from
a hardcoded value, this is the natural fix.

> I started working on such a patch but stuck disliking the probable
> need in the 'whitespace-style' large ':type' definition duplication.

I think you don't need a duplication.  You can reuse an existing type
definition by looking up the `custom-type` symbol property of an already
defined option.  See e.g. "lisp/eshell/em-cmpl.el" for a few example
definitions.

Michael.