[slime-devel] Re: marco's highly opiniated guide to editing lisp	code	in emacs
    Andreas Fuchs 
    asf at boinkor.net
       
    Mon Jul 19 21:41:33 UTC 2004
    
    
  
On 2004-07-18, Marco Baringer <mb at bese.it> wrote:
> i would also suggest checking out this: (the
> se:move-past-close-and-just-one-space function was taken from here)
>
> http://dsl-tregw1cbe.dial.inet.fi/~azure/suur-sexp.el
Yesterday, I took that function and created my own () bindings that
seem to DTRT rather often:
http://boinkor.net/lisp/balanced-parens.el
What this code does is:
 * bind ( to insert ( in comments and strings; when in code, insert
   balanced parens
 * bind ) to insert a closing paren in comments and strings; when in
   code, move past the closing paren and:
    * reindent, if we're at the top level or in a place that indents
      by 2 spaces (incredibly hacky, that) or
    * insert a space
That heuristic seems to work surprisingly well for me, so far. Perhaps
fellow slimers will like it as well.
Happy hacking,
-- 
Andreas Fuchs, <asf at boinkor.net>, asf at jabber.at, antifuchs
    
    
More information about the slime-devel
mailing list