[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How global is a define-global-minor-mode mode?
From: |
Richard Stallman |
Subject: |
Re: How global is a define-global-minor-mode mode? |
Date: |
Sun, 28 Jan 2007 02:42:17 -0500 |
> Not really: if the global minor mode is autoloaded, then :require is
> a nuisance,
> I don't follow. Could you explain why it is a nuisance?
The :require thingy is a risk: if you move the definition of the mode to
another file, then the user's customizations will be broken (it happened
with global-font-lock-mode).
It seems that you are saying the risk is that the :require has to
specify the file name, so if you move the definition to another file,
the :require argument will be wrong.
If the :require is generated automatically, perhaps it would never be
wrong.
> And how does this relate to the question of whether the globalized
> mode is autoloaded?
If it's autoloaded, then the :require is not necessary because the handling
of the autoload cookie will make sure that the minor mode function will be
called when the user has customized the mode (and will thus trigger loading
the relevant file).
I don't see how that is the case. If the minor mode is autoloaded
then calling the minor mode function will load the file. But how would
this autoload cause the function to be called in the first place?
> Are you proposing that every use of define-global-minor-mode should
> have an autoload cookie?
As a general rule, yes. I'm sure we can come up with counter examples, tho,
so there's no point trying to enforce it.
It might be an ok solution.
But do you have any objection to using :require if we make sure it
never gets the wrong file?
- Re: How global is a define-global-minor-mode mode?, (continued)
- Re: How global is a define-global-minor-mode mode?, Lennart Borgman (gmail), 2007/01/25
- Re: How global is a define-global-minor-mode mode?, Lennart Borgman (gmail), 2007/01/25
- Re: How global is a define-global-minor-mode mode?, Stefan Monnier, 2007/01/25
- Re: How global is a define-global-minor-mode mode?, Chong Yidong, 2007/01/27
- Re: How global is a define-global-minor-mode mode?, Stefan Monnier, 2007/01/25
- Re: How global is a define-global-minor-mode mode?, Richard Stallman, 2007/01/28
- Re: How global is a define-global-minor-mode mode?,
Richard Stallman <=
- Re: How global is a define-global-minor-mode mode?, Chong Yidong, 2007/01/28
- Re: How global is a define-global-minor-mode mode?, David Kastrup, 2007/01/28
- Re: How global is a define-global-minor-mode mode?, Chong Yidong, 2007/01/28
- Re: How global is a define-global-minor-mode mode?, Stefan Monnier, 2007/01/28