[Top][All Lists]

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

Re: Strange eval-after-load

From: David Kastrup
Subject: Re: Strange eval-after-load
Date: Thu, 06 Jul 2006 08:49:38 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Alan Mackenzie <address@hidden> writes:

>> The change is not visible where it happens, namely at the (provide
>> 'edebug).
> That is WHEN the change happens.  Loading edebug is the trigger.
> I'm not sure what you mean by "where", here.  Do you mean the module
> whose data is changed?  Or do you mean the module whose functions
> make the change?  If you could say what you wanted to see and why,
> that might help me.

The code is called at (provide 'edebug), and there is no way to
a) expect this
b) see what code gets called
c) debug this.

>> > There is nothing objectionable about using the documented functional
>> > interface `def-edebug-spec'.
>> Straw man.  Nobody objected to its use.  What is objectional is that
>> its call happens at the (provide 'edebug) line without any visible
>> indication in edebug.el, and without any user-accessible variables or
>> hook that would allow for inspection and modification of the behavior.
> Don't all hooks work this way?

No.  All hooks get called by
(run-hooks 'some-hook)
or equivalent.  You see the place where it happens, you can debug it,
and you can check and/or change some-hook in order to control what
gets done.

> What do you mean by "visible"?  I'm sorry, but the rest of the
> paragraph is too vague to make any sense to me.  A call happening
> without user-accessible variables or a hook is like a cuckoo clock
> chiming without Pythagoras's theorem.

It is by now abundantly clear that you choose not to understand and
will discount anything one says in the way of explanation.

>> A user won't have cause to be surprised if he added eval-after-load
>> himself.  But expecting and tracking every such use that might be
>> hidden in Emacs' code base is a bit much.
> It's no more or less difficult that tracking down every place a hook
> is used.

Wrong.  Because one _sees_ the hook getting called in the code, and
the hook has a name, and its contents can be checked.

> eval-after-load is conceptually the same as add-hook.  Why is using
> e-a-l worse than using LaTeX-mode-hook, for example?

Because there is a
(run-hook 'LaTeX-mode-hook) in LaTeX-mode explicitly (or implicitly as
part of a define-major-mode or define-derived-mode).

Because you can check LaTeX-mode-hook.  Because the point of time
where it is called is well-defined and visible.

>> The reasons have been cited to you several times and it is in the
>> manual which also has been cited to you.
> Resorts to hand waving abstractions have been made, but no descent
> to the concrete.

It is clear that you won't accept anything with a different conclusion
than what you want.

I am sorry I wasted my time in that manner.

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

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