diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-12-14 11:55:07 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-12-14 11:55:07 +0100 |
commit | c4a1b6c2ba479c6abcd22cab6a1fcd560469e986 (patch) | |
tree | 057fb773fcac4200ea66a0267a818be61cca3104 /guix/build/emacs-utils.scm | |
parent | 2ed11b3a3e05549ed6ef8a604464f424c0eeae1c (diff) | |
parent | 45c5b47b96a238c764c2d32966267f7f897bcc3d (diff) | |
download | guix-patches-c4a1b6c2ba479c6abcd22cab6a1fcd560469e986.tar guix-patches-c4a1b6c2ba479c6abcd22cab6a1fcd560469e986.tar.gz |
Merge branch 'master' into 'core-updates'.
Diffstat (limited to 'guix/build/emacs-utils.scm')
-rw-r--r-- | guix/build/emacs-utils.scm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm index 10ef3c8d0f..0cff28b45b 100644 --- a/guix/build/emacs-utils.scm +++ b/guix/build/emacs-utils.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> +;;; Copyright © 2014 Alex Kost <alezost@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,6 +21,7 @@ #:export (%emacs emacs-batch-eval emacs-batch-edit-file + emacs-generate-autoloads emacs-substitute-sexps emacs-substitute-variables)) @@ -47,6 +49,14 @@ (format #f "--eval=~S" expr))) (error "emacs-batch-edit-file failed!" file expr))) +(define (emacs-generate-autoloads name directory) + "Generate autoloads for Emacs package NAME placed in DIRECTORY." + (let* ((file (string-append directory "/" name "-autoloads.el")) + (expr `(let ((backup-inhibited t) + (generated-autoload-file ,file)) + (update-directory-autoloads ,directory)))) + (emacs-batch-eval expr))) + (define-syntax emacs-substitute-sexps (syntax-rules () "Substitute the S-expression immediately following the first occurrence of |