all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Juanma Barranquero" <lekktu@gmail.com>
Cc: Emacs Devel <emacs-devel@gnu.org>
Subject: Re: Fload does not set the 'autoload property
Date: Thu, 11 Oct 2007 10:08:52 -0400	[thread overview]
Message-ID: <jwvfy0heod6.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <f7ccd24b0710110215jce1421bn879f75d813475ce7@mail.gmail.com> (Juanma Barranquero's message of "Thu\, 11 Oct 2007 11\:15\:17 +0200")

> A bug (I think) reported in the pre-22.1 past:
> Let's assume a simple test.el with:

> ;;;; test.el ;;;;
> (defun test-fun () (interactive) t)
> (provide 'test)
> ;;;;;;;;;;;;;;;;;

> Then, if you define an interactive autoload for the function, and load
> it through the autoload mechanism:

>  M-: (autoload 'test-fun "test" nil t) [RET]
>  M-x test-fun [RET]

> the autoload spec gets saved:

>  (get 'test-fun 'autoload) => ("test" nil t nil)

> However, if you load test-fun by loading or requiring test.el:

>  M-: (autoload 'test-fun "test" nil t) [RET]
>  M-x load-library [RET] test [RET]

> the autoload spec is not saved:

>  (get 'test-fun 'autoload) => nil

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.

The way autoloads are saved/restored is currently fundamentally done at the
wrong place.


        Stefan

  reply	other threads:[~2007-10-11 14:08 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 [this message]
2007-10-11 14:27   ` Juanma Barranquero
2007-10-12  2:46 ` Fload does not set the `autoload' property Richard Stallman
2007-10-12  4:06   ` 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=jwvfy0heod6.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --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.