Extending Emacs
Emacs’ many modes come courtesy of elisp files, programs written in Emacs’ own LISP-based language and stored in .el and .elc files (the latter for compiled files). Getting into the Elisp language is outside the topic of this book,[*] but be aware that all the modes you’re working with are written in elisp.
Darwin’s directory for Emacs extensions is /usr/share/emacs/
emacs-version-number/
lisp. Generally speaking, installing Emacs extensions that you download is as simple as moving them into this folder or into the neighboring site-lisp directory. Some .el files need to be compiled in order to work; this involves using the M-x byte-compile-file command from within Emacs. Packages that contain many interdependent files, such as the PSGML extension for editing SGML and XML files (http://www.lysator.liu.se/projects/about_psgml.html), may make this process easier by including standard Unix configure and Makefile files, which often just run Emacs in batch mode to compile the files in the right order.
Many modes require you to activate various Emacs variables and settings before they’ll work. This usually involves editing your .emacs file (see the next section) in some way and is usually described in the extension’s README file, or perhaps in the comment section of the elisp file itself.
Tip
Many Emacs modes and main functions are centered around programming. The elisp files that ship with Mac OS X include full-featured (which is to say, many-variabled) major modes for C, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access