emacs-devel
[Top][All Lists]
Advanced

[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: Mon, 09 Sep 2019 12:12:56 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (windows-nt)

Applying both patches works nicely.

Should I commit this to master?

Now I have to figure out the minimum workaround for emacs 25, 26
compatibility.

Stefan Monnier <address@hidden> writes:

>> 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:
>
> Hmm... indeed it looks like you also need the patch below.
>
>> We'll need to ensure package.el does the same when it generates
>> autoloads. Or is that done on the elpa server?
>
> Indeed.  The autoloads are built when *installing* a package, so they're
> built by the user's Emacs, which may be "old".
>
>
>         Stefan
>
>
> diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
> index 541b22e3ee..8ec5150cca 100644
> --- a/lisp/emacs-lisp/autoload.el
> +++ b/lisp/emacs-lisp/autoload.el
> @@ -165,7 +165,7 @@ make-autoload
>                         define-globalized-minor-mode defun defmacro
>                      easy-mmode-define-minor-mode define-minor-mode
>                         define-inline cl-defun cl-defmacro cl-defgeneric
> -                       pcase-defmacro))
> +                       pcase-defmacro cl-defstruct))
>             (macrop car)
>          (setq expand (let ((load-file-name file)) (macroexpand form)))
>          (memq (car expand) '(progn prog1 defalias)))
>
>
>

-- 
-- Stephe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]