Stefan Monnier wrote:

   > Otherwise, if we're going to be rigid about this guideline (perhaps there
   > are good reasons to do that, even in this case), then maybe we should just
   > get rid of :init-value and have the initial value always be nil - that is,
   > make users of a library turn on the minor mode explicitly.  That would not 
be
   > my preference, but it would at least avoid confusion.

   That might be a good alternative.

No, because sometimes a standard value of t is appropriate and the
:init-value _has_ to reflect the standard value, or Custom would
consider the variable to be "rogue".

What if I just document in the Elisp manual what the acceptable
situations are for a non-nil :init-value and how it needs to be
handled:

pre-load the file containing the define-minor-mode before startup.el
and call the minor mode function (or custom-reevaluate-setting if the
minor mode only has to be enabled conditionally) in startup.el for
minor modes included with the Emacs distribution that affect Emacs
"globally" and put (if foo-mode (foo-mode 1)) at the end of the file
containing the define-minor-mode for minor modes that only affect
features defined in that file (and that are in files that are not
pre-loaded).

Sincerely,

Luc.


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to