build-system: emacs: Use new function for autoloads generation
* guix/build/emacs-utils.scm (emacs-generate-autoloads): Use 'loaddefs-generate' to create autoloads instead of 'update-directory-autoloads' if we are using a new enough Emacs Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
This commit is contained in:
parent
799f48771f
commit
58d0453aa7
@ -106,7 +106,14 @@ true, evaluate using dynamic scoping."
|
||||
(let* ((file (string-append directory "/" name "-autoloads.el"))
|
||||
(expr `(let ((backup-inhibited t)
|
||||
(generated-autoload-file ,file))
|
||||
(update-directory-autoloads ,directory))))
|
||||
(cond
|
||||
((require 'loaddefs-gen nil t)
|
||||
;; Emacs >= 29
|
||||
(loaddefs-generate ,directory ,file))
|
||||
((fboundp 'make-directory-autoloads)
|
||||
;; Emacs 28
|
||||
(make-directory-autoloads ,directory ,file))
|
||||
(t (update-directory-autoloads ,directory))))))
|
||||
(emacs-batch-eval expr #:dynamic? #t)))
|
||||
|
||||
(define* (emacs-byte-compile-directory dir)
|
||||
|
Loading…
Reference in New Issue
Block a user