[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fload does not set the 'autoload property
From: |
Stefan Monnier |
Subject: |
Re: Fload does not set the 'autoload property |
Date: |
Thu, 11 Oct 2007 10:08:52 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) |
> 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