diff options
author | Morgan Smith <Morgan.J.Smith@outlook.com> | 2022-08-10 13:37:09 -0400 |
---|---|---|
committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2022-09-11 15:46:32 +0200 |
commit | 58d0453aa7772def4de8e6aee38212a29aa84978 (patch) | |
tree | 49c503791b69274956bf6ce2e65f510c7044dd86 | |
parent | 799f48771f725abda8321ab04b6d0cdcc9261c21 (diff) |
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>
-rw-r--r-- | guix/build/emacs-utils.scm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm index fdca05602e..b2280ae70c 100644 --- a/guix/build/emacs-utils.scm +++ b/guix/build/emacs-utils.scm @@ -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) |