emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem of define-minor-mode while bootstrapping


From: Richard Stallman
Subject: Re: problem of define-minor-mode while bootstrapping
Date: Thu, 03 Oct 2002 23:49:24 -0400

    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 via email to

[Prev in Thread] Current Thread [Next in Thread]