Suppose you go into a function, add/remove some stuff, and need to
close the parens on a sexp. I *know* there has to be a function for
this. Alt-n-( is close, but it requires I count the sexp's to be
enclosed. Is there some kind of short cut to do this?
If I understand it correctly, you're looking for
slime-close-parens-at-point, which on my system is mapped to C-c C-q.
You might want to also try either paredit.el or at least
(show-paren-mode t) to make your life with parentheses smoother.
- Scott
"Jonathon McKitrick" <···········@bigfoot.com> writes:
> Suppose you go into a function, add/remove some stuff, and need to
> close the parens on a sexp. I *know* there has to be a function for
> this. Alt-n-( is close, but it requires I count the sexp's to be
> enclosed. Is there some kind of short cut to do this?
"Scott Bell" <······@gmail.com> writes:
> If I understand it correctly, you're looking for
> slime-close-parens-at-point, which on my system is mapped to C-c C-q.
>
> You might want to also try either paredit.el or at least
> (show-paren-mode t) to make your life with parentheses smoother.
In addition to slime-close-parens-at-point, you might be interested in
slime-reindent-defun (C-c M-q), which reindents the current defun,
adding closing parens as needed. It very quickly lets you know if you
have a mismatch between your parens and indentation.
--
/|_ .-----------------------.
,' .\ / | Free Mumia Abu-Jamal! |
,--' _,' | Abolish the racist |
/ / | death penalty! |
( -. | `-----------------------'
| ) |
(`-. '--.)
`. )----'
Jonathon McKitrick wrote:
> Suppose you go into a function, add/remove some stuff, and need to
> close the parens on a sexp.
You don't. ;)
Try paredit mode: http://mumble.net/~campbell/emacs/paredit.el
The only catch is that you can't simply delete or move whole
sub-s-exprs. You have to mark them and cut/paste (but mark is
re-mark-ably easy).
--
the bottom line is that a JavaSchool that won't teach C and won't teach
Scheme is not really teaching computer science, either. -- Joel Spolsky
On 9354 day of my life Ulrich Hobelmann wrote:
> Try paredit mode: http://mumble.net/~campbell/emacs/paredit.el
>
> The only catch is that you can't simply delete or move whole
> sub-s-exprs. You have to mark them and cut/paste (but mark is
> re-mark-ably easy).
M-S C-M-k ; kills all subexpressions after the point
--
Ivan Boldyrev
Violets are red
Roses are blue
It's amazing what DNA splicing can do.
Jonathon McKitrick wrote:
> Suppose you go into a function, add/remove some stuff, and need to
> close the parens on a sexp. I *know* there has to be a function for
> this. Alt-n-( is close, but it requires I count the sexp's to be
> enclosed. Is there some kind of short cut to do this?
Try to learn the key combinations described at
http://groups.google.com/group/comp.lang.lisp/msg/41c58160793f2c83
Pascal
--
My website: http://p-cos.net
Closer to MOP & ContextL:
http://common-lisp.net/project/closer/