unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Kaushal Modi <kaushal.modi@gmail.com>
Cc: Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>
Subject: Re: Basic question about autoload function
Date: Fri, 08 Dec 2017 14:39:29 +0100	[thread overview]
Message-ID: <87mv2ts5im.fsf@web.de> (raw)
In-Reply-To: <CAFyQvY3=TqWLCnQDAsWXp0zyw1xMhCmRrmGVYUy0n0d8r8rS_Q@mail.gmail.com> (Kaushal Modi's message of "Wed, 06 Dec 2017 19:14:33 +0000")

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.



  reply	other threads:[~2017-12-08 13:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-06 18:55 Basic question about autoload function Kaushal Modi
2017-12-06 19:04 ` Drew Adams
2017-12-06 19:14   ` Kaushal Modi
2017-12-08 13:39     ` Michael Heerdegen [this message]
2017-12-08 18:59       ` Kaushal Modi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mv2ts5im.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=kaushal.modi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).