[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: autoload cl-defstruct constructor?
From: |
Stephen Leake |
Subject: |
Re: autoload cl-defstruct constructor? |
Date: |
Fri, 06 Sep 2019 15:25:29 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (windows-nt) |
Stefan Monnier <address@hidden> writes:
>> If I add an autoload cookie to a cl-defstruct, running
>> update-directory-autoloads on the above gives:
>>
>> ---
>>
>> ;;; Generated autoloads from gnat-core.el
>>
>> (cl-defstruct gnat-compiler "\
>> Used with wisi-compiler-* generic functions." gpr-file run-buffer-name
>> project-path target runtime gnat-stub-opts gnat-stub-cargs)
>
> Oh, right, because when the autoloads are generated `cl-defstruct` is
> not defined at all. If you run update-directory-autoloads from within
> a running Emacs where cl-lib is loaded, it will give you a result that's
> much closer to what you want.
Hmm. To build autoloads.el for ada-mode in my development tree, I run:
emacs -Q -batch --eval "(progn (require 'autoload)(require 'cl-lib)(setq
generated-autoload-file (expand-file-name
\"../autoloads.el\"))(update-directory-autoloads \"../\"))"
I just added the (require 'cl-lib), but I still get the same result for
a cl-defstruct:
--- autoloads.el
;;; Generated autoloads from gnat-core.el
(cl-defstruct gnat-compiler "\
Used with wisi-compiler-* generic functions." gpr-file run-buffer-name
project-path target runtime gnat-stub-opts gnat-stub-cargs)
(autoload 'create-gnat-compiler "gnat-core" "\
---
What am I missing?
We'll need to ensure package.el does the same when it generates
autoloads. Or is that done on the elpa server?
> Making cl-defstruct into an autoloaded macro would solve this part of
> the problem.
I guess that means adding a special case in make-autoload?
--
-- Stephe
- autoload cl-defstruct constructor?, Stephen Leake, 2019/09/04
- Re: autoload cl-defstruct constructor?, Stefan Monnier, 2019/09/04
- Re: autoload cl-defstruct constructor?, Stephen Leake, 2019/09/05
- Re: autoload cl-defstruct constructor?, Stefan Monnier, 2019/09/06
- Re: autoload cl-defstruct constructor?,
Stephen Leake <=
- Re: autoload cl-defstruct constructor?, Stefan Monnier, 2019/09/07
- Re: autoload cl-defstruct constructor?, Stephen Leake, 2019/09/09
- Re: autoload cl-defstruct constructor?, Stephen Leake, 2019/09/09
- Re: autoload cl-defstruct constructor?, Stefan Monnier, 2019/09/09