[Top][All Lists]

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

Re: doc of defining minor modes

From: David Kastrup
Subject: Re: doc of defining minor modes
Date: Fri, 19 May 2006 00:36:41 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

"Drew Adams" <address@hidden> writes:

>     >     > What's unpredicable? Can someone please provide a concrete
>     >     > example of the problem? I'm not getting it. The doc and
>     >     > comments made here so far constitute only vague warnings
>     >     > - what is the problem?
>     >
>     >     That a minor mode might just get turned on without the
>     >     user wanting it.  Possibly because the user did something
>     >     as simple as browsing customization groups.
>     >
>     > Can you please explain how that would happen? How can a minor-mode get
>     > turned on if the mode variable already has a value?
>     Why should it have a value when the library gets loaded due to
>     customize?
> Regardless of how the library is loaded, either:
> 1) the user has a setting for the mode variable in .emacs, and that is
> evaluated before the library is loaded, or
> 2) the user has such a setting in .emacs, but the library is somehow loaded
> before the setting takes effect, or
> 3) the user has no such setting in .emacs.
> In #3, the library is loaded and the default value chosen by the
> library writer is used - the mode is turned on or left off, as the
> writer deemed appropriate. The user has expressed no preference. No
> problem.

Look, this is getting silly.  It has been pointed out about five times
to you already that a mode suddenly turning itself on without the user
requesting it _is_ a problem.  That's why the writer should deem it
appropriate to have the default be _off_ when the file gets loaded.

And it is not like this is a new debate, anyway.

>     It is not appropriate to turn on minor modes without the user
>     asking for it. That's what the recommendation is all about.
> Is it appropriate to set the mode to off initially, if the user
> wants it on?

If the user has not indicated that he wants it on, there is no reason
to assume so.

> The point of :init-value was to specify only a _default_ value, to
> be used only if the user expressed no preference beforehand.

And we are talking about this.  If your insistence about wanting to
shoot yourself in the foot is supposed to be representative, one
should probably remove the :init-value option altogether.

> Now I think I hear that Customize, menus, et al might lqoad the
> library before the user can even express a choice, and that that
> load might somehow override a user setting in .emacs.

You are wildly speculating.  We are talking about the case where there
is no user setting in .emacs.

> If that is the case, then :init-value is not a default value at
> all. And in that case, things are broken beyond what a simple
> recommendation can heal. In that case, there should be no
> :init-value at all, because it can trample user settings.

You are arguing straw men.

>     Then you should perhaps read the respective discussion in the
>     archives.  It is not like this has not been talked through
>     already.  It is tiresome if people start finished discussions
>     and decisions all over again without bothering to get up to
>     scratch first.
> I asked several times for a specific scenario. If this has already
> been beaten to death by others, then all you need to do is point me
> to the thread.

It has been beaten to death even in this thread.

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

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