[slime-devel] Indentation question
Nikodemus Siivola
nikodemus at random-state.net
Wed Mar 30 13:08:46 UTC 2011
I have a nasty habit of writing macros with multiple keyword clauses
in them--like this:
(deffoo foo (stuff)
(:bar (a b)
(cons a b))
(:zot (a b c)
(fii a b c))
(:default
42)
(:error
(crap)))
which of course tend to indent terribly
(deffoo foo (stuff)
(:bar (a b)
(cons a b))
(:zot (a b c)
(fii a b c))
(:default
42)
(:error
(crap)))
I've occasionally added special indentation rules for these things in
.emacs, but that's no fun at all. I've also sometimes used non-keyword
symbols and added global definitions which tell slime how to indent
things:
(defmacro bar (lambda-list &body body)
(error "oops, not in DEFFOO"))
None of these is really satisfactory: hacking .emacs means users of a
library that has macros with this style don't get the correct
indentation in Slime out of the box. Using non-keyword symbols makes
the code harder to read. (Keywords make it obvious that those are
clauses or options of some sort.)
Can someone suggest something better?
Cheers,
-- Nikodemus
More information about the slime-devel
mailing list