aboutsummaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-03-10 11:24:46 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-03-10 11:25:47 -0700
commitfd58b21f9af92ebf0bc37cf53eec05feacbe0780 (patch)
treea90574af4772a5c0af96ed9524a57cb838e37255 /emacs
parent6023b51ef5d31e33e2ee4a92490c2b16d8ca526a (diff)
downloadconsfigurator-fd58b21f9af92ebf0bc37cf53eec05feacbe0780.tar.gz
dynamically regenerate emacs/put-forms.el at package build time
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'emacs')
-rw-r--r--emacs/Makefile8
-rw-r--r--emacs/put-forms.el13
2 files changed, 8 insertions, 13 deletions
diff --git a/emacs/Makefile b/emacs/Makefile
index 1c29533..3f9309c 100644
--- a/emacs/Makefile
+++ b/emacs/Makefile
@@ -1,6 +1,14 @@
+LOAD = '(let ((asdf:*user-cache* "/tmp") \
+ (asdf:*central-registry* (list (truename "..")))) \
+ (asdf:load-system "consfigurator"))'
+
SUBSTITUTE = 'BEGIN { open FH, "<", "put-forms.el"; \
chomp($$forms = join "", map s/^/ /r, grep /^\(put/, <FH>) } \
s/ \@putforms@/$$forms/'
consfigurator.el: consfigurator.el.in put-forms.el
perl -wpe$(SUBSTITUTE) consfigurator.el.in >consfigurator.el
+
+put-forms.el:
+ sbcl --disable-debugger --eval '(require "asdf")' --eval $(LOAD) \
+ --eval '(consfigurator::dump-properties-for-emacs "$@")' --quit
diff --git a/emacs/put-forms.el b/emacs/put-forms.el
deleted file mode 100644
index 91273bb..0000000
--- a/emacs/put-forms.el
+++ /dev/null
@@ -1,13 +0,0 @@
-;; automatically generated by
-;; CONSFIGURATOR::DUMP-PROPERTIES-FOR-EMACS; do not edit
-
-(put 'consfigurator:deploys. 'common-lisp-indent-function '2)
-(put 'consfigurator:deploys-these. 'common-lisp-indent-function '2)
-(put 'file:has-content 'common-lisp-indent-function '1)
-(put 'file:has-content. 'common-lisp-indent-function '1)
-(put 'file:contains-lines. 'common-lisp-indent-function '1)
-(put 'file:data-uploaded. 'common-lisp-indent-function '2)
-(put 'file:secret-uploaded. 'common-lisp-indent-function '2)
-(put 'file:regex-replaced-lines. 'common-lisp-indent-function '2)
-(put 'os:debian-stable. 'common-lisp-indent-function '1)
-(put 'chroot:%os-bootstrapped. 'common-lisp-indent-function '2)