unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 21507@debbugs.gnu.org, Drew Adams <drew.adams@oracle.com>,
	Kaushal Modi <kaushal.modi@gmail.com>
Subject: bug#21507: 25.0.50: (global-SOME-MINOR-MODE) not affecting fundamental mode buffers
Date: Wed, 26 May 2021 18:41:07 -0400	[thread overview]
Message-ID: <jwvfsy9m89n.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87wnrl86s9.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 27 May 2021 00:33:10 +0200")

Lars Ingebrigtsen [2021-05-27 00:33:10] wrote:
> Lars Ingebrigtsen <larsi@gnus.org> writes:
>>> If I tweak my minor mode to be of my2-mode (change the init value to
>>> t)or my3-mode (force the init value to t using setq-default) types
>>> above, then my minor mode gets enabled globally in true sense (even in
>>> buffers created using get-create-buffer).
>>>
>>> In essence, setting the init value as t is not the same as enabling a
>>> globalized minor mode.
>>>
>>> Is this by design? 
>> Anybody know?
> Perhaps Stefan does; added to the CCs.

Maybe I misunderstand the question, but a minor mode is defined by
a function that can used to turn it ON/OFF and a variable that lets you
know where it's ON or OFF.

Setting the var directly rather than via the minor mode function just
breaks the abstraction and its behavior is thus "defined by
implementation" and subject to change.

Similarly `:init-value` is used to tell Emacs what is the initial state,
rather than to set this initial state.


        Stefan






  reply	other threads:[~2021-05-26 22:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-17 16:15 bug#21507: 25.0.50: (global-SOME-MINOR-MODE) not affecting fundamental mode buffers Kaushal Modi
2020-12-28  0:28 ` Lars Ingebrigtsen
2021-05-26 22:33   ` Lars Ingebrigtsen
2021-05-26 22:41     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-05-27 23:37       ` Lars Ingebrigtsen

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=jwvfsy9m89n.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=21507@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    --cc=kaushal.modi@gmail.com \
    --cc=larsi@gnus.org \
    --cc=monnier@iro.umontreal.ca \
    /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).