next up previous
Next: Files, buffers, and windows Up: Basic Editing Previous: Replacement


Certain collections bindings of keys to commands and other parameter settings are referred to as modes. When such collections simply modify a few characteristics, they are called minor modes. Emacs will automatically establish a mode for buffers containing certain files depending on the name of their associated file. Thus, buffers with extensions `.c' and `.h' start out in C mode, which affects the behavior of tab commands, for example. The shell buffer runs in Shell mode. Files with unclassifiable names generally start in Fundamental mode. For routine work, you will seldom need to worry about these modes.

There is one useful minor mode that's worth knowing about, however.

M-x auto-fill-mode
toggles (reverses the setting) of auto-fill mode, which by default is usually off. In auto-fill mode, lines get broken automatically as they are being typed when they get too long. When you are typing comments in C programs, auto-fill mode will automatically start a new comment on the next line when the current line gets near to filling up.

David Wolfe