Next: , Previous: Banner, Up: Contributed Packages

8.10 Editing Commands

The package slime-editing-commands provides some commands to edit Lisp expressions.

C-c M-q
M-x slime-reindent-defun
Re-indents the current defun, or refills the current paragraph. If point is inside a comment block, the text around point will be treated as a paragraph and will be filled with fill-paragraph. Otherwise, it will be treated as Lisp code, and the current defun will be reindented. If the current defun has unbalanced parens, an attempt will be made to fix it before reindenting.
C-c C-]
M-x slime-close-all-parens-in-sexp
Balance parentheses of open s-expressions at point. Insert enough right parentheses to balance unmatched left parentheses. Delete extra left parentheses. Reformat trailing parentheses Lisp-stylishly.

If REGION is true, operate on the region. Otherwise operate on the top-level sexp before point.

M-x slime-insert-balanced-comments
Insert a set of balanced comments around the s-expression containing the point. If this command is invoked repeatedly (without any other command occurring between invocations), the comment progressively moves outward over enclosing expressions. If invoked with a positive prefix argument, the s-expression arg expressions out is enclosed in a set of balanced comments.
M-x slime-beginning-of-defun

M-x slime-end-of-defun