On 2004-07-18, Marco Baringer mb@bese.it wrote:
i would also suggest checking out this: (the se:move-past-close-and-just-one-space function was taken from here)
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,