all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
To: "Juanma Barranquero" <lekktu@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Fload does not set the `autoload' property
Date: Thu, 11 Oct 2007 22:46:38 -0400	[thread overview]
Message-ID: <E1IgAXu-0004ey-5Q@fencepost.gnu.org> (raw)
In-Reply-To: <f7ccd24b0710110215jce1421bn879f75d813475ce7@mail.gmail.com> (lekktu@gmail.com)

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.

  parent reply	other threads:[~2007-10-12  2:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-11  9:15 Fload does not set the 'autoload property Juanma Barranquero
2007-10-11 14:08 ` Stefan Monnier
2007-10-11 14:27   ` Juanma Barranquero
2007-10-12  2:46 ` Richard Stallman [this message]
2007-10-12  4:06   ` Fload does not set the `autoload' property Stefan Monnier
2007-10-13  1:26   ` Juanma Barranquero
2007-10-14 16:28     ` Richard Stallman

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

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

  git send-email \
    --in-reply-to=E1IgAXu-0004ey-5Q@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=lekktu@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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.