Learning GNU Emacs, 3rd Edition
by Debra Cameron, James Elliott, Marc Loy, Eric S. Raymond, Bill Rosenblatt
A Word About Modes
Emacs achieves some of its famed versatility by having various editing modes in which it behaves slightly differently. The word mode may sound technical, but what it really means is that Emacs becomes sensitive to the task at hand. When you're writing, you often want features like word wrap so that you don't have to press Enter at the end of every line. When you're programming, the code must be formatted correctly depending on the language. For writing, there's text mode; for programming, there are modes for different languages, including C, Java, and Perl. Modes, then, allow Emacs to be the kind of editor you want for different tasks.
Text mode and Java mode are major modes. A buffer can be in only one major mode at a time; to exit a major mode, you have to enter another one. Table 1-1 lists some of the major modes, what they do, and where they're covered in this book.
Table 1-1. Major modes
|
Mode |
Function |
|---|---|
|
Fundamental mode |
The default mode (Chapter 6) |
|
Text mode |
For writing text (Chapter 2) |
|
View mode |
For viewing files but not editing (Chapter 4) |
|
Shell mode |
For running a shell within Emacs (Chapter 5) |
|
Outline mode |
For writing outlines (Chapter 7) |
|
Indented text mode |
For indenting text automatically (Chapter 7) |
|
Paragraph indent text mode |
For indenting the first line of each paragraph (Chapter 7) |
|
Picture mode |
For creating ASCII drawings using the keyboard (Chapter 7) |
|
HTML mode |
For writing HTML (Chapter 8) |
|
SGML mode |
For ... |