all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tu Do <tuhdo1710@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: [ANN] Lisp source code formatter in any major mode (including fundamental-mode)
Date: Wed, 8 Apr 2015 08:11:56 -0700 (PDT)	[thread overview]
Message-ID: <faaf0d82-6d9b-4683-9e84-4bf7e433986c@googlegroups.com> (raw)

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.


                 reply	other threads:[~2015-04-08 15:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=faaf0d82-6d9b-4683-9e84-4bf7e433986c@googlegroups.com \
    --to=tuhdo1710@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.