unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Cc: miles@gnu.org, monnier+gnu/emacs@rum.cs.yale.edu, handa@m17n.org,
	emacs-devel@gnu.org
Subject: Re: problem of define-minor-mode while bootstrapping
Date: Thu, 03 Oct 2002 23:49:24 -0400	[thread overview]
Message-ID: <E17xJSu-0005Qa-00@fencepost.gnu.org> (raw)
In-Reply-To: <rzqlm5gbgn7.fsf@albion.dl.ac.uk> (message from Dave Love on 02 Oct 2002 23:49:32 +0100)

    I don't understand the problem with this.  Those issues are
    well-known, and various packages have been modified to avoid them, as
    discussed with you.  This is in (elisp)Coding Conventions anyhow:

       * When a package provides a modification of ordinary Emacs behavior,
	 it is good to include a command to enable and disable the feature,
	 Provide a command named `WHATEVER-mode' which turns the feature on
	 or off, and make it autoload (*note Autoload::).  Design the
	 package so that simply loading it has no visible effect--that
	 should not enable the feature.(2)  Users will request the feature
	 by invoking the command.

Simply loading a file should not enable its features.
But if you first do something that explicitly
asks for its features to be enabled, then load the file,
that is a different issue entirely.  In this case, you are
not *just* loading the file.

It used to be that minor modes were always controlled by variables.
Setting or binding the variable was the way to enable the minor mode.
For user convenience, there were commands to do toggle or set the
variable.

As a result of define-minor-mode, this is not true any more.  There
are now some minor modes you cannot enable just by setting or binding
a variable.  But many minor modes still can be enabled that way.
Therefore, the ones that can't be enabled that way should have doc
strings to say so.

However, it is a useful feature that if the user just sets the
variable in .emacs before loading the file, that does manage
to enable the variable.

  reply	other threads:[~2002-10-04  3:49 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-19 13:20 problem of define-minor-mode while bootstrapping Kenichi Handa
2002-09-19 13:46 ` Stefan Monnier
2002-09-20  0:06   ` Kenichi Handa
2002-09-20 18:38     ` Stefan Monnier
2002-09-21  1:57       ` Kenichi Handa
2002-09-22 22:54         ` Stefan Monnier
2002-09-23  2:08           ` Kenichi Handa
2002-09-23 18:27             ` Stefan Monnier
2002-09-24  3:06               ` Kenichi Handa
2002-09-24 15:33                 ` Stefan Monnier
2002-09-24 23:45                   ` Kenichi Handa
2002-09-21  2:00       ` Miles Bader
2002-09-22 15:55         ` Richard Stallman
2002-09-25 22:50           ` Dave Love
2002-09-26 21:45             ` Richard Stallman
2002-09-27 14:09               ` Dave Love
2002-09-28  3:19                 ` Richard Stallman
2002-09-30  6:26                   ` Kenichi Handa
2002-10-18  7:00                     ` Richard Stallman
2002-10-18  8:38                       ` Kenichi Handa
2002-10-20  5:34                         ` Richard Stallman
2002-10-02 22:49                   ` Dave Love
2002-10-04  3:49                     ` Richard Stallman [this message]
2002-09-22 21:40         ` Stefan Monnier

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=E17xJSu-0005Qa-00@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=handa@m17n.org \
    --cc=miles@gnu.org \
    --cc=monnier+gnu/emacs@rum.cs.yale.edu \
    /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).