help-gnu-emacs
[Top][All Lists]
Advanced

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

RE: Basic question about autoload function


From: Drew Adams
Subject: RE: Basic question about autoload function
Date: Wed, 6 Dec 2017 11:04:02 -0800 (PST)

> I have recently realized that (autoload #'foo-fn "bar-pkg")
> works even if foo-fn is *not* defined inside bar-pkg.

What do you mean by "works"?

All that does is cause file bar-pkg.el[c] to be loaded
whenever someone or something tries to invoke/use function,
macro, or keymap `foo-fn'.  (But it does nothing if `foo-fn'
is a function already defined.)

Yes, nothing implies that `foo-fn' is defined in bar-pkg.el.

> The documentation also doesn't say that it has to be that way.

What doesn't have to be what way?

> So I was just pleasantly surprised that that did the right thing.

The right thing being ___?  I guess you wanted Emacs to
load that file when that function is invoked?



reply via email to

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