Re: [gentoo-dev] [PATCH] elisp-common.eclass: fix for Emacs 29 (explicitly require autoload)

2022-08-18 Thread Ulrich Mueller
> On Thu, 18 Aug 2022, Sam James wrote:

>   ${EMACS} ${EMACSFLAGS} \
> + --eval "(require 'autoload)" \
>   --eval "(setq make-backup-files nil)" \
>   --eval "(setq generated-autoload-file (expand-file-name 
> \"${f}\"))" \
>   -f batch-update-autoloads "${@-.}"

Thanks, merged.


signature.asc
Description: PGP signature


Re: [gentoo-dev] [PATCH] elisp-common.eclass: fix for Emacs 29 (explicitly require autoload)

2022-08-18 Thread Sam James


> On 18 Aug 2022, at 22:28, Maciej Barć  wrote:
> 
>> We could do it based on the Emacs version though if the eclass
>> has machinery for checking that (new to poking at this area).
> 
> 
> There are elisp-emacs-version & elisp-check-emacs-version functions.
> 
> 

Thanks! I think I'm too new to elisp to confidently give a patch
to convert to loaddefs-generate though.

Best,
sam



signature.asc
Description: Message signed with OpenPGP


Re: [gentoo-dev] [PATCH] elisp-common.eclass: fix for Emacs 29 (explicitly require autoload)

2022-08-18 Thread Maciej Barć

We could do it based on the Emacs version though if the eclass
has machinery for checking that (new to poking at this area).



There are elisp-emacs-version & elisp-check-emacs-version functions.


On 8/18/22 23:25, Sam James wrote:




On 18 Aug 2022, at 21:01, Michael Orlitzky  wrote:

On Thu, 2022-08-18 at 20:18 +0100, Sam James wrote:

Emacs 29's NEWS says: "The autoload.el library is now obsolete."

...

${EMACS} ${EMACSFLAGS} \
+   --eval "(require 'autoload)" \
--eval "(setq make-backup-files nil)" \
--eval "(setq generated-autoload-file (expand-file-name 
\"${f}\"))" \
-f batch-update-autoloads "${@-.}"


The batch-update-autoloads docstring says that it "calls 'update-
directory-autoloads' on the command line arguments." The function
update-directory-autoloads is, in turn, obsoleted in favor of loaddefs-
generate from loaddefs-gen.el (which replaces autoload.el).

Can we bypass the obsolete autoload.el entirely here, instead calling
loaddefs-generate directly?




It looks like it might be new as of Emacs 29, so we'd need
to handle older versions somehow.

We could do it based on the Emacs version though if the eclass
has machinery for checking that (new to poking at this area).


--
Have a great day!

~ Maciej XGQT Barć


OpenPGP_0x14D74A1F43A6AC3C.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Re: [gentoo-dev] [PATCH] elisp-common.eclass: fix for Emacs 29 (explicitly require autoload)

2022-08-18 Thread Sam James


> On 18 Aug 2022, at 21:01, Michael Orlitzky  wrote:
> 
> On Thu, 2022-08-18 at 20:18 +0100, Sam James wrote:
>> Emacs 29's NEWS says: "The autoload.el library is now obsolete."
>> 
>> ...
>> 
>>  ${EMACS} ${EMACSFLAGS} \
>> +--eval "(require 'autoload)" \
>>  --eval "(setq make-backup-files nil)" \
>>  --eval "(setq generated-autoload-file (expand-file-name 
>> \"${f}\"))" \
>>  -f batch-update-autoloads "${@-.}"
> 
> The batch-update-autoloads docstring says that it "calls 'update-
> directory-autoloads' on the command line arguments." The function
> update-directory-autoloads is, in turn, obsoleted in favor of loaddefs-
> generate from loaddefs-gen.el (which replaces autoload.el).
> 
> Can we bypass the obsolete autoload.el entirely here, instead calling
> loaddefs-generate directly?
> 
> 

It looks like it might be new as of Emacs 29, so we'd need
to handle older versions somehow.

We could do it based on the Emacs version though if the eclass
has machinery for checking that (new to poking at this area).


signature.asc
Description: Message signed with OpenPGP


Re: [gentoo-dev] [PATCH] elisp-common.eclass: fix for Emacs 29 (explicitly require autoload)

2022-08-18 Thread Michael Orlitzky
On Thu, 2022-08-18 at 20:18 +0100, Sam James wrote:
> Emacs 29's NEWS says: "The autoload.el library is now obsolete."
> 
> ...
>  
>   ${EMACS} ${EMACSFLAGS} \
> + --eval "(require 'autoload)" \
>   --eval "(setq make-backup-files nil)" \
>   --eval "(setq generated-autoload-file (expand-file-name 
> \"${f}\"))" \
>   -f batch-update-autoloads "${@-.}"

The batch-update-autoloads docstring says that it "calls 'update-
directory-autoloads' on the command line arguments." The function
update-directory-autoloads is, in turn, obsoleted in favor of loaddefs-
generate from loaddefs-gen.el (which replaces autoload.el).

Can we bypass the obsolete autoload.el entirely here, instead calling
loaddefs-generate directly?