eisl
eisl copied to clipboard
eislformat program
Can you expose formatter.lsp
as a standalone program, runnable as a Unix shell command?
Something like: eislformat < unformatted-code.lsp > formatted-code.lsp
with error/warning messages to stderr.
If it supports formatting from stdin to stdout, it's easy to add Emacs support.
It's difficult to make it standalone, but I think I can change the file output to standard output. It is a method to add an option to the formatter function and set the output destination to standard output. I will try it.
I improved the formatter. If you give the 'stdio symbol instead of file, the input/output will be the standard input/output. Will this work? e.g.
> (formatter 'stdio)
(defun foo (x) (if (= x 1) 2 3))
(defun foo (x)
(if (= x 1)
2
3 ))
^C
Easy-ISLisp Ver2.60
>