Subject: Re: bug#30978: 25.3; Suggestion: define-minor-mode should define mode-lighter variable

From: Kévin Le Gouguec <[email-masked]>
Date: Wed, 28 Jul 2021 22:00:49 +0200

Lars Ingebrigtsen <[email-masked]> writes:

> It's already pretty easy to just alter the lighters -- just say:
>
> (setcar (cdr (assoc 'foo-mode minor-mode-alist)) "whatever")

Manipulating minor-mode-alist is not that hard indeed; there are some
sources of hassle though:

(1) figuring out the name of the mode variable (e.g. auto-fill-function,
    defining-kbd-macro);

(2) some modes seem not to add their variables to minor-mode-alist for
    some reason (e.g. caps-lock-mode on GNU ELPA), so this recipe does
    not work (neither does delight); one needs to fallback to
    add-to-list.

Nothing too herculean, but I'm sure some users would appreciate a
built-in function to figure out this stuff for them.

(And IIUC, solving this with a function, rather than automatically
creating variables for each minor mode, would address your concern about
bloat, since any added bloat would be opt-in)