Next: Fortran Mode Up: Modes Previous: Smart Quotes Contents

## C Mode

C Mode facilitates the editing of C files. Much of the latter part of the development of the jed editor was done using this mode. This mode may be customized by a judicious choice of the variables `C_INDENT` and `C_BRACE` as well as the bindings of the curly brace keys `{` and }. Experiment to find what you like or write your own using the S-Lang interface.

By default, the ENTER key is bound to the function `newline_and_indent`. This does what its name suggests: inserts a newline and indents. Again, some modes may rebind this key. In addition, the keys `{`, `}`, and TAB are also special in this mode. The TAB key indents the current line and the `{` and `}` keys insert themselves and reindent. If you do not like any of these bindings, simply rebind the offending one to `self_insert_cmd`.

Finally, the key sequence ESC ; is bound to a function called `c_make_comment`. This function makes and indents a C comment to the column specified by the value of the variable `C_Comment_Column`. If a comment is already present on the line, it is indented.

Next: Fortran Mode Up: Modes Previous: Smart Quotes Contents