Chapter 14. Emacs LISP Programming

If you have been using Emacs for a while and have been taking advantage of some of its more advanced features, chances are that you have found something that Emacs doesn’t do. Although Emacs has hundreds of built-in commands, dozens of packages and modes, and so on, everyone eventually runs into some functionality that Emacs doesn’t have—by default. Whatever functionality you find missing, you can program it using Emacs LISP.

Before you plunge in, however, note that this chapter is not for everyone. It is intended for people who have already become comfortable using Emacs and who have some programming experience, though not necessarily with LISP per se. If you have no such experience, you may want to skip this chapter; if there is something specific you would like Emacs to do, you might try to find a friendly Emacs LISP hacker to help you write the necessary code.

In addition, we will not cover LISP in its entirety in this chapter. That would require a full book. Instead, we will cover the basics of the language and other features that are often useful in writing Emacs code. If you wish to go beyond this chapter, turn to the Gnu Emacs LISP Reference Manual, available from the Free Software Foundation (their address is given in Appendix A), or any of the various LISP textbooks available (Winston and Horn’s LISP, Addison-Wesley, 1984, is a good choice).

Emacs LISP is a full-blown LISP implementation; [76]thus it is more than the usual macro or script ...

Get Learning GNU Emacs, Second Edition 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.