Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

sorting cdr of form in Emacs/SLIME?

27 views
Skip to first unread message

Tamas Papp

unread,
May 16, 2013, 5:43:21 AM5/16/13
to
Hi,

I like to sort some forms alphabetically, especially in package/system
definitions. Eg instead of

(asdf:load-systems "cl-slice"
"let-plus"
"alexandria")

I prefer

(asdf:load-systems "alexandria"
"cl-slice"
"let-plus")

Is there a way I can sort the CDR of a form in Emacs/SLIME? Would
really help when tidying up code.

Best,

Tamas

Madhu

unread,
May 16, 2013, 6:12:12 AM5/16/13
to
* Tamas Papp <877gizn...@tamas.ihs.ac.at> :
Wrote on Thu, 16 May 2013 11:43:21 +0200:
| (666:load-systems "cl-slice"
| "let-plus"
| "alexandria")
|
| I prefer
|
| (666:load-systems "alexandria"
| "cl-slice"
| "let-plus")
|
| Is there a way I can sort the CDR of a form in Emacs/SLIME? Would
| really help when tidying up code.

Suppose you have a form like:, first put the cursor here,

(666:load-systems "cl-slice"
;;;(1) -----------^
"let-plus"
"alexandria")

Then hit Ctrl-Space to set the mark. M-x set-mark-command

Then move the cursor here
(666:load-systems "cl-slice"
"let-plus"
"alexandria")
;;;(2) -----------------------^

To select the region.

Then type M-x sort-words

PS: I don't recommend you use any of those libraries, let alone write
anymore.

--- Madhu

Antsan

unread,
May 16, 2013, 12:03:22 PM5/16/13
to
What's wrong with those libraries?
0 new messages