[Top][All Lists]

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

Re: obsolete comment in tool-bar.el

From: Luc Teirlinck
Subject: Re: obsolete comment in tool-bar.el
Date: Fri, 15 Jul 2005 17:46:49 -0500 (CDT)

   Can you prevent users and Custom from doing it?  If not, the "should not"
   consideration is fairly meaningless.

No code can prevent users from making mistakes.  No code can reliably
correct user mistakes and I do not believe that one should try to do
that.  Just alert the user that there may be a problem, but do not
blindly try to correct.  We _can_ correct bugs in defcustoms included
with the Emacs distribution.

   > Moreover, if it is done before loading the file, it is done before the
   > define-minor-mode.

   Of course.  I'm not sure why you say it, tho.  I must be
   misunderstanding something.

Well there are two problems.  The first is : does `define-minor-mode'
really need to call the mode function?  My remark you quoted is
irrelevant to this question.

The second question is, _if_ define-minor-mode needs to call the mode
function, should the minor mode be called through eval-after-load or
should the call to define-minor-mode be postponed until all necessary
functions are defined.  This problem is what the remark you quoted
applies to.

I do not immmediately know the answer to the first question, although
I am definitely not sure that the answer is yes.  The motivation is
nowhere pointed out clearly.  If the only motivation is to autocorrect
user mistakes or bugs in Custom, then I believe that the answer is
definitely no.  If the motivation is a non-nil standard value (which
is relatively rare), you can either take care of this in the
:initialize function and document that define-minor-mode should not be
called too soon or let the programmer call the mode function near the
end of the file and explain how to do that correctly in the docstring.
There is no need to automate everything.



reply via email to

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