aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--debian/changelog2
-rw-r--r--debian/control6
-rw-r--r--emacs/Makefile8
-rw-r--r--emacs/put-forms.el13
-rw-r--r--src/property.lisp21
6 files changed, 25 insertions, 26 deletions
diff --git a/.gitignore b/.gitignore
index 2d38eb6..0972ba5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
/doc/_build/
+/emacs/put-forms.el
/emacs/consfigurator.el
diff --git a/debian/changelog b/debian/changelog
index 2a583c6..d4558ad 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,7 @@
consfigurator (0.2.1-2) UNRELEASED; urgency=medium
* Install consfigurator.el using dh_elpa
- - Add build-dep on dh-elpa
+ - Add build-deps on dh-elpa, each cl-* package used by Consfigurator, sbcl
- Add Provides: elpa-consfigurator.
-- Sean Whitton <spwhitton@spwhitton.name> Tue, 09 Mar 2021 23:23:03 -0700
diff --git a/debian/control b/debian/control
index fd9ab8a..1815d01 100644
--- a/debian/control
+++ b/debian/control
@@ -3,9 +3,15 @@ Section: admin
Priority: optional
Maintainer: Sean Whitton <spwhitton@spwhitton.name>
Build-Depends:
+ cl-alexandria,
+ cl-babel,
+ cl-cffi,
+ cl-interpol,
+ cl-ppcre,
debhelper-compat (= 13),
dh-elpa,
python3-sphinx,
+ sbcl,
sphinx-common,
texinfo,
Standards-Version: 4.5.1
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)
diff --git a/src/property.lisp b/src/property.lisp
index 11acab9..2aeb836 100644
--- a/src/property.lisp
+++ b/src/property.lisp
@@ -106,18 +106,15 @@
(defvar *properties-for-emacs* nil
"List of properties whose symbols have Emacs indentation information.")
-(defun dump-properties-for-emacs (dir)
- (with-current-directory (dir)
- (with-open-file (s "emacs/put-forms.el"
- :direction :output :if-exists :supersede)
- (format s ";; automatically generated by~%")
- (format s ";; CONSFIGURATOR::DUMP-PROPERTIES-FOR-EMACS; do not edit~%~%")
- (loop for (prop . indent) in (nreverse
- (mappend (lambda (s) (get s 'indent))
- *properties-for-emacs*))
- do (format s "(put '~A 'common-lisp-indent-function '~A)~%"
- prop indent)))
- (run-program '("git" "add" "emacs/put-forms.el"))))
+(defun dump-properties-for-emacs (file)
+ (with-open-file (s file :direction :output :if-exists :supersede)
+ (format s ";; automatically generated by~%")
+ (format s ";; CONSFIGURATOR::DUMP-PROPERTIES-FOR-EMACS; do not edit~%~%")
+ (loop for (prop . indent) in (nreverse
+ (mappend (lambda (s) (get s 'indent))
+ *properties-for-emacs*))
+ do (format s "(put '~A 'common-lisp-indent-function '~A)~%"
+ prop indent))))
(defun store-indentation-info-for-emacs (sym args &optional info)
(let* ((short-name