Chapter 6, Writing Macros , discusses using macros to eliminate repetitive tasks.
Chapter 7, Simple Text Formatting and Specialized Editing , covers basic text formatting (such as tabs, indentation, and centering) as well as some of the more rarefied features, like outline mode and rectangle editing.
Chapter 8, Markup Language Support , describes Emacs support for HTML, XML, TEX, and LATEX.
Chapter 9, Computer Language Support , covers Emacs as a programming environment, including editing support for C, Java, Lisp, Perl, and SQL, as well as the interface to compilers and the Unix makeutility. It also describes the Java Development Environment for Emacs (JDEE).
Chapter 10, Customizing Emacs , describes Emacs's customization facilities. The interactive Custom tool allows you to change variables without editing your startup file. The chapter also explains how to set up your .emacs customization file. It describes how to modify your display, keyboard commands, and editing environment as well as how to load Lisp packages for extra functionality.
Chapter 11, Emacs Lisp Programming , describes the basics of Emacs Lisp, the language you can use to further customize Emacs.
Chapter 12, Version Control , describes VC mode for version control and its interface to CVS, RCS, Subversion, and SCCS.
Chapter 13, Platform-Specific Considerations , discusses how to install Emacs on Unix, Windows, and Mac OS X. It also provides platform-specific information for Windows and Mac OS X.
Chapter 14 Chapter 14. The Help System Emacs has the most comprehensive help facility of any text editor—and one of the best such facilities of any program at all. In fact, the Emacs help facilities probably cut down the time it took for us to write this book by an order of magnitude, and they can help you immeasurably in your ongoing quest to learn more about Emacs. In this chapter, we describe Emacs help in the following areas: • The tutorial. • The help key ( C-h ) and Help menu, which allow you to get help on a wide variety of topics. • The help facilities of complex commands like query-replace and dired . • Navigating Emacs manuals and using the info documentation reader. • Completion , in which Emacs helps you finish typing names of functions, variables, filenames, and more. Completion not only saves you time and helps you complete names of functions you know about but can help you discover new commands and variables.
, The Help System , describes Emacs's rich, comprehensive online help facilities.
Appendix A, Emacs Variables , lists many important Emacs variables, including all the variables mentioned in this book.
Appendix B, Emacs Lisp Packages , lists some of the most useful Lisp packages that come with Emacs.
Appendix C, Bugs and Bug Fixes , tells you how (and when) to report bugs you find in Emacs. It also describes how to contribute to the GNU Project, whether through code enhancements or monetarily.
Appendix D, Online Resources , gives a tour of some important Emacs-related web sites.
Appendix E, Quick Reference , provides brief descriptions of the most important Emacs commands discussed in this book.
The book concludes with a glossary that defines Emacs terms you'll encounter, an index, and a detachable quick reference card that summarizes important commands for easy access.
GNU Emacs is a large and powerful editor; in this book, we give you only a sample of what it does. Many features have been left out, and more features are added all the time. Some topics, however, are not covered:
Compatibility modes
GNU Emacs provides compatibility modes for vi, for example. We've left a discussion of these modes out. If you really want to use vior another editor, do so. You're better off getting to know Emacs on its own terms rather than pretending it is something else.
Many programming language modes
In this book, we discuss editing modes for C++, Java, Lisp, Perl, and SQL. There are many modes for other languages, including rare languages like Scheme. There's no way we could discuss everything.
Advanced Lisp programming
GNU Emacs incorporates a complete Lisp interpreter. We give a very basic and brief introduction to Emacs Lisp; Chapter 11should be enough to get you started, but it really only scratches the surface. We recommend the FSF's Emacs Lisp Reference Manual , now included in the Emacs distribution.
Using Emacs to access the Internet
When our last edition came out, it was common to use Emacs to access Internet resources or read email. Now that isn't so common; better mailers, browsers, and other tools are commonly in use on all platforms.
Unicode support
At present, Emacs is on its way to full Unicode support; that is the most important change slated for the next major release. At this writing, Unicode support is spotty.
Games and amusements
GNU Emacs includes an eclectic bunch of games and amusements, including the ability to pipe random quotations from Zippy the Pinhead into the famous "Eliza" pseudopsychoanalyst. Emacs 21 includes a Games menu under Tools with several cool ways to waste time in Emacs (and it doesn't even include Emacs's version of pong, one of our favorites). Alas, we had to draw the line somewhere.
Emacs commands consist of a modifier, such as Control, which you hold down as you would the Shiftkey, and a series of keystrokes. For example, Control-x Control-ssaves a file.
The other modifier Emacs uses is the Metakey. Few keyboards have keys labeled Meta. Because of this, in previous editions of this book, we refused to talk about the Metakey and substituted Escin all our instructions.
In this edition, we want you to learn where the Metakey is. Typically Metakeys are to the immediate left and right of the Space bar. On Linux and Windows keyboards, the Altkey is the Metakey. On Mac keyboards, the Applekey, often called Commandis the Metakey by default.
Why learn about and use the Metakey? The reason is speed. We emphasize key bindings in this book. New users may find icons and menus helpful, but in the long run, learning how to keep your hands on the keyboard allows you to gain speed and boosts your productivity. The Metakey will help you gain that speed and make it easy for you to use Emacs help, which refers to Meta.
Depending on your style, you may still prefer to use Escinstead of Meta. Just bear in mind that with Escyou press and release the key, then press the next key.
Conventions Used in This Book
This section covers the conventions used in this book.
Emacs commands consist of a modifier, such as Ctrlor Meta, followed by one or two characters. Commands shown in this book abbreviate Ctrlto Cand Metato M:
C-g
Hold down the Ctrlkey and press g.
M-x
Hold down the Metakey and press x.
Sometimes Metais followed by a literal hyphen character. In these cases, we spell out Meta:
Читать дальше