diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-03-10 11:24:46 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-03-10 11:25:47 -0700 |
commit | fd58b21f9af92ebf0bc37cf53eec05feacbe0780 (patch) | |
tree | a90574af4772a5c0af96ed9524a57cb838e37255 /src | |
parent | 6023b51ef5d31e33e2ee4a92490c2b16d8ca526a (diff) | |
download | consfigurator-fd58b21f9af92ebf0bc37cf53eec05feacbe0780.tar.gz |
dynamically regenerate emacs/put-forms.el at package build time
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src')
-rw-r--r-- | src/property.lisp | 21 |
1 files changed, 9 insertions, 12 deletions
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 |