GNU bug report logs - #30978
25.3; Suggestion: define-minor-mode should define mode-lighter variable

Previous Next

Package: emacs;

Reported by: Howard Melman <hmelman <at> gmail.com>

Date: Wed, 28 Mar 2018 20:13:02 UTC

Severity: wishlist

Tags: moreinfo, wontfix

Found in version 25.3

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

Bug is archived. No further changes may be made.

Full log


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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Phil Sainty <psainty <at> orcon.net.nz>
Cc: Stefan Kangas <stefan <at> marxist.se>, 30978 <at> debbugs.gnu.org,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#30978: 25.3; Suggestion: define-minor-mode should define
 mode-lighter variable
Date: Sun, 25 Jul 2021 09:59:34 +0200
Phil Sainty <psainty <at> orcon.net.nz> writes:

>> Does anybody else have an opinion here?  The suggestion is to make
>> define-minor-mode define a `foo-mode-lighter' variable that users can
>> then change to easily change the lighters.
>
> It sounds like a good change.

I just can't make up my mind here.  On the one hand, a
`foo-mode-lighter' variable would make things easy and regular.  On the
other hand, it means creating a new user option for each minor mode
(i.e., a defcustom), and it means having these in `minor-mode-alist',
which means one additional variable lookup (per minor mode) when
creating the mode line.

>> Or do we have a separate mechanism for this somewhere?
>
> We do in GNU ELPA (see https://www.emacswiki.org/emacs/DelightedModes
> regarding the one I wrote, delight.el), but that and similar libraries
> mostly exist because there wasn't something as trivial as a variable
> to set.
>
> Delight also takes care of synchronising the label in `mode-line-menu'
> (down-mouse-3 on `mode-line-modes'), as well as allowing custom names
> for major modes via the same UI -- but providing an easy way to set
> minor mode lighters was the actual reason for writing it.

It sounds like delight is the right solution here -- it's a more
complete solution, and people who want this can just install your
package...

So...  on the whole...  I think we shouldn't add the -lighter
variables.  So I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




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

Previous Next


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