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 16:02:40 +0100
User-agent: Mutt/1.5.9i

Hi, Richard!

On Tue, Jul 04, 2006 at 08:54:30AM -0400, Richard Stallman wrote:
>     PLEASE, PLEASE, PLEASE give your views on the example I quoted from
>     cc-defs.el.

> It is obsolete -- the code should use `declare'.

> def-edebug-spec is autoloaded, so calls to it do not _need_ to be in
> eval-after-load.  However, it is inefficient to load all of edebug
> just to execute a call to def-edebug-spec; so I think it would be good
> to move that definition into subr.el.

I'm sure this isn't the only such example.  As a more general solution
(with the idea coming from David Kastrup), how about each "utility"
library having an initialisation hook, along the lines of
c-initialization-hook?  Thus, edebug-initialization-hook would be run
exactly once, after first initialising edebug.  This could entirely
eliminate the need to use eval-after-load.

> Would someone like to do that?

>     Given that CC Mode is intented to be compatible with many (X)Emacs
>     versions, nearly all of which lack the `declare' feature in defmacro, I
>     cannot see how I can get along without eval-after-loads like the above.

> For XEmacs, you can use a conditional.  Old Emacs versions do not
> matter; I do not want ugly code for their sake.
 
OK.  From my point of view, such a conditional would make the upstream
CC Mode code ugly and (marginally) more difficult to maintain.  It's
been one of CC Mode's objectives (since 4004 B.C.) to maintain
compatibility with older (X)Emacsen as far as possible.  We shouldn't be
fighting over this incompatibility in project aims.  ;-)
 
>     I do not understand why you regard eval-after-load as objectionable.

> I am sorry you don't understand, but I will not change this policy
> and I don't have time to reopen the question.  I have other work to do!

OK.  I don't understand this policy, and I don't agree with it.  I'll
follow Martin Stjernholm's lead here[*], and say that while I won't
make these changes myself, neither in savannah nor in the CC Mode
project at SourceForge, I will respect them (in merging, for example) if
made by other people in the savannah repository.

[*] the issue then (2003) was the use of the CL stuff in Emacs at
run-time.

Thanks for being definite, here - I've got other work to do, too.  :-)

-- 
Alan.





reply via email to

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