GNU bug report logs - #53776
Modeline indicator when using define-minor-mode

Previous Next

Package: emacs;

Reported by: goncholden <goncholden <at> protonmail.com>

Date: Fri, 4 Feb 2022 11:56:01 UTC

Severity: wishlist

Tags: notabug

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stephen Berman <stephen.berman <at> gmx.net>
To: goncholden via "Bug reports for GNU Emacs, the Swiss army knife of text
 editors" <bug-gnu-emacs <at> gnu.org>
Cc: 53776 <at> debbugs.gnu.org, goncholden <goncholden <at> protonmail.com>
Subject: Re: bug#53776: Modeline indicator when using define-minor-mode
Date: Fri, 04 Feb 2022 14:02:27 +0100
On Fri, 04 Feb 2022 11:55:45 +0000 goncholden via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org> 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




This bug report was last modified 3 years and 104 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.