emacs-devel
[Top][All Lists]
Advanced

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

Re: Strange eval-after-load


From: Richard Stallman
Subject: Re: Strange eval-after-load
Date: Tue, 04 Jul 2006 13:30:17 -0400

    Richard, please tell me what's wrong with using eval-after-load.

Here's the explanation from tips.texi.

@item
Redefining (or advising) an Emacs primitive is a bad idea.  It may do
the right thing for a particular program, but there is no telling what
other programs might break as a result.  In any case, it is a problem
for debugging, because the two advised function doesn't do what its
source code says it does.  If the programmer investigating the problem
is unaware that there is advice on the function, the experience can be
very frustrating.

We hope to remove all the places in Emacs that advise primitives.
In the mean time, please don't add any more.

@item
It is likewise a bad idea for one Lisp package to advise a function
in another Lisp package.

@item
Likewise, avoid using @code{eval-after-load} (@pxref{Hooks for
Loading}) in libraries and packages.  This feature is meant for
personal customizations; using it in a Lisp program is unclean because
it modifies the behavior of another Lisp file in an invisible way.
This is an obstacle for debugging, much like advising a function in
the other package.




reply via email to

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