(emacs)Balanced Editing

Next: Symbol Completion Prev: Comments Up: Programs

Editing Without Unbalanced Parentheses

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

     Move past next close parenthesis and re-indent

   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.  Then you can type `M-)', which moves past the close
parenthesis, deleting any indentation preceding it (in this example
there is none), and indenting with LFD after it.

   `M-(' may insert a space before the open parenthesis, depending on
the syntax class or the preceding character.  Set
`parens-dont-require-spaces' to a non-`nil' value if you wish to
inhibit this.

automatically generated by info2www