emacs-devel
[Top][All Lists]
Advanced

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

Re: Fload does not set the `autoload' property


From: Richard Stallman
Subject: Re: Fload does not set the `autoload' property
Date: Thu, 11 Oct 2007 22:46:38 -0400

There is a deliberate reason for treating autoloading differently
from calls to `load' or `require'.

Calling an autoload function is a request to use that function, not a
request to load the file.  If loading the file fails to define the
function that you tried to call, then Emacs did not do what you asked
for.  So we put the function back as it was.

By contrast, calling `load' and `require' is an explicit request to
load the file.  Whatever the file does, that's what you asked for.  So
there is no particular need to try to undo anything that the file did.

However, it might be a bug that this affects the `autoload' property.
Maybe we should set the `autoload' property for every definition of a
function that was previously autoloaded.

This would probably mean setting the `autoload' property in Ffset
instead of in do_autoload.

If we change this, we should consider it a bug fix,
so we should do it now and fix it in Emacs 22.2.
Would someone like to try implementing that change?


Stefan wrote:

    Similarly, if your file contains 2 autoloads (foo1 and foo2), and the file
    gets autoloaded via foo1, only foo1's autoload gets saved in the
    `autoload' property.

That surprises me -- the code seems to do this for every autoloaded
function defined by the file, if it was loaded by do_autoload.




reply via email to

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