emacs-devel
[Top][All Lists]
Advanced

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

Re: Strange eval-after-load


From: Alan Mackenzie
Subject: Re: Strange eval-after-load
Date: Tue, 4 Jul 2006 22:08:05 +0100
User-agent: Mutt/1.5.9i

On Tue, Jul 04, 2006 at 01:30:17PM -0400, Richard Stallman wrote:
>     Richard, please tell me what's wrong with using eval-after-load.
 
> Here's the explanation from tips.texi.

[ .... ]

> @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.

(eval-after-load "edebug" '(def-edebug-spec c-point t))

To construe this form as "modifying the behaviour of another Lisp file
(?edebug, presumably) in an invisible way" seems like a total perversion
of reality to me.  I would call this e-a-l "Telling another Lisp file
how to handle the current one" - in essence, the module which is
modified by this e-a-l is cc-defs, not edebug.

[Just for clarity, this point is independent of the precise semantics of
`def-edebug-spec'.  I think it is also the case that `def-edebug-spec'
doesn't modify edebug's state at all.]

-- 
Alan.





reply via email to

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