[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Basic question about autoload function
From: |
Michael Heerdegen |
Subject: |
Re: Basic question about autoload function |
Date: |
Fri, 08 Dec 2017 14:39:29 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Kaushal Modi <kaushal.modi@gmail.com> writes:
> I meant to say that the documentation does not imply that the FUNCTION
> has to be defined inside FILE. I was wondering if that was intentional
> i.e. FUNCTION can or cannot be defined inside FILE.
Looking at the DEFUN of `autoload-do-load' in eval.c, it is only checked
whether after loading the FILE, the `indirect-function' of the symbol
FUNCTION has changed. So AFAICT yes, it doesn't matter where the
function is defined, as long as it has been defined after loading the
FILE. Which is also what I would expect, since "the file which defined
some function" is not necessarily well-defined.
Michael.