[Top][All Lists]

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

Re: address@hidden: Info on define-minor-mode - :init-value or :initial-

From: Luc Teirlinck
Subject: Re: address@hidden: Info on define-minor-mode - :init-value or :initial-value?]
Date: Wed, 27 Jul 2005 11:04:25 -0500 (CDT)

Richard Stallman wrote:

   Would someone please DTRT and then respond?

For the moment, I just replaced the incorrect keyword :initial-value
in the example with :init-value.

However, probably somewhat more extensive changes are needed.  The
example (now) does:

  :init-value nil

But this is redundant, as the default :init-value is nil anyway.  So
it probably just should be deleted.

There is more.  You can not specify a non-nil :init-value, unless
either the minor mode is enabled by just setting the variable or
unless you do something extra.  That something extra is to preload the
file containing the define-minor-mode before startup.el and then using
`custom-reevaluate-setting in startup.el (for files included with the
Emacs distribution) or to call the minor mode function near the end of
the file (for files not included with the Emacs distribution).  We
could either document these requirements in the Elisp manual and the
define-minor-mode docstring or change define-minor-mode so that these
requirements are no longer necessary.  The latter requires changes
which Stefan probably would not like.  For instance it would mean that
the call to `define-minor-mode' would need to be delayed until after
all functions used by the minor mode function have been defined (but
only for define-minor-mode's with a non-nil :init-value).



reply via email to

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