Subject: Re: bug#53776: Modeline indicator when using define-minor-mode

From: goncholden <[email-masked]>
Date: Fri, 04 Feb 2022 13:22:08 +0000

------- Original Message -------

On Friday, February 4th, 2022 at 1:02 PM, Stephen Berman <[email-masked]> wrote:

> On Fri, 04 Feb 2022 11:55:45 +0000 goncholden via "Bug reports for GNU Emacs, the Swiss army knife of text editors" [email-masked] wrote:
>
> > Have been using define-minor-mode and noticed that when setting the
> > modeline indicator, the text is appended with no space between other
> > modeline indicators. Is this how :lighter is supposed to work?
>
> Yes, the lack of a space is in the definition of `mode-line-modes':` (:propertize ("" minor-mode-alist)
>
> I guess the reason is that you can have multiple minor mode lighters and
> providing a space between each would complicate the definition of
> `mode-line-modes', so that's the job of the minor mode definition
> itself:
>
> > (define-minor-mode rich-minor-mode
> >
> > "This is the docstring."
> > :lighter "rich"
>
> So you should do this: :lighter " rich"
>
> Steve Berman

Because one can easily add minor-modes that exceed the mode-line mini-buffer, is there
the capability of making a hierarchical modeline indicator.

e.g.

Emacs-Lisp
company
Outl
Gon -> rich
    -> gudin
    -> cholden