diff options
author | Alex Kost <alezost@gmail.com> | 2014-12-01 20:21:08 +0300 |
---|---|---|
committer | Alex Kost <alezost@gmail.com> | 2014-12-02 22:09:23 +0300 |
commit | 0b08600ca5fa791731135111000243a9942aab41 (patch) | |
tree | 3cc19795deac1a0a96de62608beff4bbf8ccd8af /guix/build | |
parent | 12f2490aa3b9341e6df9df75bf88d7b2b502376d (diff) | |
download | gnu-guix-0b08600ca5fa791731135111000243a9942aab41.tar gnu-guix-0b08600ca5fa791731135111000243a9942aab41.tar.gz |
build: emacs-utils: Add 'emacs-generate-autoloads'.
* guix/build/emacs-utils.scm (emacs-generate-autoloads): New procedure.
Diffstat (limited to 'guix/build')
-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 |