commit:     424bd8ae7cbb3ce55e0567e8c9057d8d23c6cb57
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 18 19:18:20 2022 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Thu Aug 18 22:24:43 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=424bd8ae

elisp-common.eclass: fix for Emacs 29 (explicitly require autoload)

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

We should therefore explicitly 'require it in order to have the
eclass machinery work.

Fix build failures with e.g. exec-path-from-shell, flycheck:
```
 * Generating autoload file for GNU Emacs ...

Error: void-function (batch-update-autoloads)
  debug-early-backtrace()
  debug-early(error (void-function batch-update-autoloads))
  batch-update-autoloads()
  command-line-1(("--eval" "(setq make-backup-files nil)" "--eval" "(setq 
generated-autoload-file (expand-file-name 
\"exec-path-from-shell-autoloads.el\"))" "-f" "batch-update-autoloads" "."))
  command-line()
  normal-top-level()
Symbol’s function definition is void: batch-update-autoloads
 * elisp-make-autoload-file: batch-update-autoloads failed
 [ !! ]
 * ERROR: app-emacs/exec-path-from-shell-1.12::gentoo failed (compile phase):
 *   (no error message)
```

See https://www.mail-archive.com/freebsd-pkg-fallout <AT> 
freebsd.org/msg1982134.html
and https://lists.gnu.org/archive/html/bug-gnu-emacs/2022-08/msg01259.html.

Thanks-to: John Turner <jturner.usa+gentoo <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 eclass/elisp-common.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/elisp-common.eclass b/eclass/elisp-common.eclass
index 47c8132192ca..2715c26c91a8 100644
--- a/eclass/elisp-common.eclass
+++ b/eclass/elisp-common.eclass
@@ -329,6 +329,7 @@ elisp-make-autoload-file() {
        EOF
 
        ${EMACS} ${EMACSFLAGS} \
+               --eval "(require 'autoload)" \
                --eval "(setq make-backup-files nil)" \
                --eval "(setq generated-autoload-file (expand-file-name 
\"${f}\"))" \
                -f batch-update-autoloads "${@-.}"

Reply via email to