unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Phil Sainty <psainty@orcon.net.nz>
Cc: 30978@debbugs.gnu.org, Stefan Kangas <stefan@marxist.se>,
	Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#30978: 25.3; Suggestion: define-minor-mode should define mode-lighter variable
Date: Sun, 25 Jul 2021 09:59:34 +0200	[thread overview]
Message-ID: <87r1fmx1qx.fsf@gnus.org> (raw)
In-Reply-To: <97892e0eebeeff0413287058d68ad86b@webmail.orcon.net.nz> (Phil Sainty's message of "Sat, 26 Jun 2021 10:57:13 +1200")

Phil Sainty <psainty@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





  reply	other threads:[~2021-07-25  7:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-28 20:11 bug#30978: 25.3; Suggestion: define-minor-mode should define mode-lighter variable Howard Melman
2019-07-14 13:40 ` Lars Ingebrigtsen
     [not found]   ` <CADwFkmk-oFgHAwgcZ=-utkBU303x4vF9c9vkuUfpkPinL7Q0KQ@mail.gmail.com>
2020-08-23 12:22     ` Lars Ingebrigtsen
2021-06-25 14:27       ` Lars Ingebrigtsen
2021-06-25 22:57         ` Phil Sainty
2021-07-25  7:59           ` Lars Ingebrigtsen [this message]
2021-07-25 16:43             ` Howard Melman
2021-07-28 15:31               ` Lars Ingebrigtsen
2021-07-28 19:10                 ` Howard Melman
2021-07-29 12:11                   ` Lars Ingebrigtsen
2021-07-28 20:00                 ` Kévin Le Gouguec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r1fmx1qx.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=30978@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=psainty@orcon.net.nz \
    --cc=stefan@marxist.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).