unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* [ANN] Lisp source code formatter in any major mode (including fundamental-mode)
@ 2015-04-08 15:11 Tu Do
  0 siblings, 0 replies; only message in thread
From: Tu Do @ 2015-04-08 15:11 UTC (permalink / raw)
  To: help-gnu-emacs

A few days ago I announced a new released of Srefactor with only a rudimentary support for Lisp code formatting. Now it is quite complete and can format a 10k Lisp source file fine in around 10 seconds, with significant time spending on indentation rather than code rearrangement.

Homepage: https://github.com/tuhdo/semantic-refactor.

Some demos:

- Formatting whole buffer in Clojure: http://i.imgur.com/puTmYJL.gif
- Formatting whole buffer demo in Emacs Lisp: http://i.imgur.com/BNWSL7W.gif
- Transform between one line <--> Multiline: http://i.imgur.com/L8D5tXv.gif

Available Commands:

- srefactor-lisp-format-buffer: format whole buffer
- srefactor-lisp-format-defun: format current defun cursor is in
- srefactor-lisp-one-line: turn the current sexp of the same level into one line; with prefix argument, recursively turn all inner sexps into one line.
- srefactor-lisp-format-sexp: format the current sexp cursor is in.

The formatting commands are usable on Common Lisp and Scheme as well. With such formatting tool like this, it would be useful when you try to read your Emacas Lisp backtrace (which is just one-line unformatted code), other than writing code.

If there is any problem, please submit an issue report and I will be happy to fix it.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-04-08 15:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-08 15:11 [ANN] Lisp source code formatter in any major mode (including fundamental-mode) Tu Do

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).