Next: , Previous: , Up: Programs   [Contents][Index]


21.7 Editing Without Unbalanced Parentheses

M-(

Put parentheses around next sexp(s) (insert-parentheses).

M-)

Move past next close parenthesis and re-indent (move-over-close-and-reindent).

The commands M-( (insert-parentheses) and M-) (move-over-close-and-reindent) are designed to facilitate a style of editing which keeps parentheses balanced at all times. M-( inserts a pair of parentheses, either together as in ‘()’, or, if given an argument, around the next several sexps, and leaves point after the open parenthesis. Instead of typing ( F O O ), you can type M-( F O O, which has the same effect except for leaving the cursor before the close parenthesis. You can then type M-), which moves past the close parenthesis, deletes any indentation preceding it (in this example there is none), and indents with LFD after it.