diff options
Diffstat (limited to 'guix/build/emacs-utils.scm')
-rw-r--r-- | guix/build/emacs-utils.scm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm index 1684bf3262..8ee547f2b3 100644 --- a/guix/build/emacs-utils.scm +++ b/guix/build/emacs-utils.scm @@ -38,6 +38,7 @@ emacs-generate-autoloads emacs-byte-compile-directory + emacs-header-parse as-display emacs-substitute-sexps @@ -114,6 +115,14 @@ true, evaluate using dynamic scoping." (byte-recompile-directory (file-name-as-directory ,dir) 0 1)))) (emacs-batch-eval expr))) +(define (emacs-header-parse section file) + "Parse the header SECTION in FILE and return it as a string." + (emacs-batch-script + `(progn + (require 'lisp-mnt) + (find-file ,file) + (princ (lm-header ,section))))) + (define as-display ;syntactic keyword for 'emacs-substitute-sexps' '(as display)) |