Organization of This Book

Each chapter in this book builds on the chapters before it. I recommend that you read the chapters in order; that way everything should make sense.

Chapter 1

Introduces some basic changes you can make to Emacs. It will familiarize you with Emacs Lisp, how to evaluate Lisp expressions, and how that alters Emacs's behavior.

Chapter 2

Continues the tutorial by teaching you how to write Lisp functions and install them so they're invoked at the right time. Hooks and the feature called advice are introduced.

Chapter 3

Teaches techniques for saving information between separate function calls and helping groups of functions work together—the first step in writing systems instead of mere commands. Symbol properties and markers are among the topics introduced along the way.

Chapter 4

Shows some of the most common techniques you'll need: those that affect the current buffer and strings within it. Regular expressions are introduced.

Chapter 5

Discusses loading, autoloading, and packages, which are features you'll need when you start creating large groups of related functions.

Chapter 6

Fills in some background on this fundamental feature of Lisp.

Chapter 7

Shows how to assemble related functions and variables into an editing package called a "minor mode." The central example in this chapter deals with making paragraph formatting in Emacs work more like paragraph formatting in a word processor.

Chapter 8

Shows the flexibility of the Emacs Lisp interpreter, how to control what gets evaluated when, and how to write code that is impervious to run-time errors.

Chapter 9

Explains the differences between minor and major modes, and offers a simple example of the latter: a mode for treating a file of quotations in a more structured manner than ordinary text.

Chapter 10

Defines a major mode that drastically alters Emacs's normal behavior. It's a crossword puzzle editor and an illustration of how flexible an environment Emacs is for developing text-oriented applications.

Appendix B

Provides a handy guide to Lisp's syntax, data types, and control structures.

Appendix C

Describes tools you can use to track down problems in your Emacs Lisp code.

Appendix D

Explains the steps you should take when you want to distribute your creations to other people.

Appendix E

Outlines the steps necessary to get a working version of Emacs running on your system.

Get Writing GNU Emacs Extensions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.