unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Ergus <spacibba@aol.com>
Cc: emacs-devel@gnu.org
Subject: Re: Syntax sugar question
Date: Sun, 11 Apr 2021 08:59:33 -0400	[thread overview]
Message-ID: <jwvr1jhgex3.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20210411030711.cpbbesqkuipt3lzc@Ergus> (Ergus's message of "Sun,  11 Apr 2021 05:07:11 +0200")

> Why the minor modes variables are only t or nil?

Because that's how they've been defined.  There's nothing magical about
minor modes, so you can definitely define something that looks and acts
very much like a minor mode but doesn't limit itself to boolean values.

Whether the `define-minor-mode` macro should offer a way to do that is
hence a UI design question.  I can see the benefit of what you propose,
but I also see the benefit of sticking to this simple model.

[ I don't understand the choice of "Subject:" here, I must say.
  What do minor modes have to do with syntactic sugar?  ]


        Stefan




  reply	other threads:[~2021-04-11 12:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210411030711.cpbbesqkuipt3lzc.ref@Ergus>
2021-04-11  3:07 ` Syntax sugar question Ergus
2021-04-11 12:59   ` Stefan Monnier [this message]
2021-04-11 19:42   ` Nikolay Kudryavtsev

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=jwvr1jhgex3.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=spacibba@aol.com \
    /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).