[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: doc of defining minor modes
From: |
Drew Adams |
Subject: |
RE: doc of defining minor modes |
Date: |
Fri, 19 May 2006 08:59:34 -0700 |
No minor modes get enabled
by anything except explicit enabling, unless they are harmless.
That was the question: what does it mean to be harmless? The answer I got
was that enabling the mode is always itself harmful, because it is
disorienting. That implies that "unless they are harmless" means unless pigs
fly.
It is sometimes useful to enable a minor mode upon load
I am not sure what that means. If you present a specific scenario
I could think about it.
A simple, standalone, external library that defines a minor mode. The user
alone can load the library. (I don't see how it could be loaded
automatically, since it is unknown to Emacs until it is loaded.) The user
simply loads the library, turning on the mode automatically. Where's the
problem? If the user wants to load the library without turning on the mode,
then s?he sets the mode variable to nil first.
Whether I'm right or wrong about a standalone library being harmless, the
doc needs clarification. It is not at all clear why we provide :init-value
and then tell people not to use it. The potential problem mentioned here
involving automatic loading of a library behind the user's back is not
mentioned in the doc, and it is the motivation behind the admonition not to
use :init-value t. It's fine to issue a guideline "Don't do this!", but it
helps to explain why the rule makes sense.
- RE: doc of defining minor modes, (continued)
- Re: doc of defining minor modes, Stefan Monnier, 2006/05/19
- RE: doc of defining minor modes, Drew Adams, 2006/05/19
- Re: doc of defining minor modes, David Kastrup, 2006/05/19
- Re: doc of defining minor modes, Stefan Monnier, 2006/05/19
- Re: doc of defining minor modes, Miles Bader, 2006/05/18
Re: doc of defining minor modes, David Kastrup, 2006/05/18
Re: doc of defining minor modes, Richard Stallman, 2006/05/18
- RE: doc of defining minor modes,
Drew Adams <=