[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
A number of Emacs commands that aren't designed specifically for editing programs are useful for that nonetheless.
The Emacs commands that operate on words, sentences and paragraphs are useful for editing code. Most symbols names contain words (see section T.1 Words); sentences can be found in strings and comments (see section T.2 Sentences). Paragraphs in the strict sense can be found in program code (in long comments), but the paragraph commands are useful in other places too, because programming language major modes define paragraphs to begin and end at blank lines (see section T.3 Paragraphs). Judicious use of blank lines to make the program clearer will also provide useful chunks of text for the paragraph commands to work on. Auto Fill mode, if enabled in a programming language major mode, indents the new lines which it creates.
The selective display feature is useful for looking at the overall structure of a function (see section J.9 Selective Display). This feature hides the lines that are indented more than a specified amount. Programming modes often support Outline minor mode (see section T.8 Outline Mode). The Foldout package provides folding-editor features (see section T.8.5 Folding Editing).
The "automatic typing" features may be useful for writing programs. See section `Autotyping' in Autotyping.