[Top][All Lists]

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

Re: eval-after-load as a macro (and eval-next-after-load)

From: Luc Teirlinck
Subject: Re: eval-after-load as a macro (and eval-next-after-load)
Date: Mon, 7 Apr 2003 07:50:30 -0500 (CDT)

Kai Grossjohann wrote:

   So what's left is a good name for the new macro.  Then the docstring
   for eval-after-load could point to the new macro, and old code
   wouldn't change behavior at all :-)

I believe that, in that case, the quote below from the Elisp manual
must be reworded too.  If that quote is accurate, we are trying very
hard to make writing badly designed code more convenient, which does
not seem to be a very meaningful activity.  Actually, if the quote
would be accurate, then it would be very bad that there is that much
old code that uses the function.  The quote below clearly says that it
is *not* OK to use this function outside of sloppy personal
customizations.  (Which might only mean that there is something wrong
with the quote itself.)

>From C-h i g (elisp)Hooks for Loading:
(talking about eval-after-load)

   In general, well-designed Lisp programs should not use this feature.
The clean and modular ways to interact with a Lisp library are (1)
examine and set the library's variables (those which are meant for
outside use), and (2) call the library's functions.  If you wish to do
(1), you can do it immediately--there is no need to wait for when the
library is loaded.  To do (2), you must load the library (preferably
with `require').

   But it is OK to use `eval-after-load' in your personal
customizations if you don't feel they must meet the design standards for
programs meant for wider use.



reply via email to

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