Re: editor for direct editing of the syntax tree: possible?



Xah Lee <xah@xxxxxxxxxx> wrote:

(1) have a function, such that when invoked, the current block of
lisp code the cursor is on, will be all reformatted by a mechanical
rule. (somewhat analogous to fill-paragraph)

Something like this in Emacs lisp?

(defun grind ()
(interactive)
(save-excursion
(beginning-of-defun)
(indent-pp-sexp)))

It probably needs tweeking, may require a late version of Emacs, may not
leave point where you expect. I haven't tested it. Just wondering if
it is the general idea you are looking for.
.