> Loading a file should change Emacs's state as little as possible, so the
> init-value of a minor mode should *describe* (not determine) the default
> state of the minor-mode (in the case where the minor-mode function is not
> executed).
> I understood that. However setting the mode variable to t without
> enabling the mode has some very bad consequences, to the point that I
> believe it could be considered an outright bug. If the mode has a
> lighter, the mode line claims that the mode is enabled, whereas it is
> not, confusing the user. Even though the mode variable is non-nil,
> the mode is disabled, so `M-x foo-mode' should enable it. Instead,
> `M-x foo-mode' is actually a no-op in this situation, which is also
> very confusing to the user.
No, you did not understand, please re-read. Think about the difference
between describing and determining. If without running the minor-mode
function its state is inactive, then the init-state has to be nil.
The init-state should only ever be t if the mode is active even without
having ever run the minor-mode function.
Stefan
_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel