Go to the previous, next section.
We have now reached the end of this Introduction. You have now learned enough about programming in Emacs Lisp to set values, to write simple `.emacs' files for yourself and your friends, and write simple customizations and extensions to Emacs.
This is a place to stop. Or, if you wish, you can now go onward, and teach yourself.
You have learned some of the basic nuts and bolts of programming. But only some. There are a great many more brackets and hinges that are easy to use that we have not touched.
A path you can follow right now lies among the sources to GNU Emacs and in The GNU Emacs Lisp Reference Manual.
The Emacs Lisp sources are an adventure. When you read the sources and come across a function or expression that is unfamiliar, you need to figure out or find out what it does.
Go to the Reference Manual. It is a through, complete, and fairly easy-to-read description of Emacs Lisp. It is written not only for experts, but for people who know what you know. (The Reference Manual comes with the standard GNU Emacs distribution. Like this introduction, it comes as a Texinfo source file, so you can read it on-line and as a typeset, printed book.)
Go to the other on-line help that is part of GNU Emacs: the on-line
documentation for all functions, and
find-tags , the program
that takes you to sources.
Here is an example of how I explore the sources. Because of its name,
`simple.el' is the file I looked at first, a long time ago. As
it happens some of the functions in `simple.el' are complicated,
or at least look complicated at first sight. The first function, for
example, looks complicated. This is the
You may want to walk through this function slowly, as we did with the
forward-sentence . You don't need to read all the functions.
count-words-in-defun , the
function contains 27 words and symbols.
Even though it is short,
split-line contains four expressions
we have not studied:
insert , and `?\n'.
insert function. (It is mentioned in passing in
the review section in section Regular Expression Searches.)
In Emacs, you can find out more about
insert by typing C-h
describe-function ) and the name of the function. This
gives you the function documentation. You can look at its source
find-tag , which is bound to M-. (this is not so
helpful in this case; the function is a primitive written in C rather
than Lisp). Finally, you can find out what the Reference Manual has
to say by visiting the manual in Info, and typing i
Info-index ) and the name of the function, or by looking up
insert in the index to a printed copy of the manual.
Similarly, you can find out what is meant by `?\n'. You can try
Info-index with `?\n'. It turns out that this
action won't help; but don't give up. If you search the index for
`\n' without the `?', you will be taken directly to the
relevant section of the manual. (See section 'Character Type' in The GNU Emacs Lisp Reference Manual. `?\n' stands
for the newline character.)
You may be able to guess what is done by
indent-to ; or you can look them up, too. (Incidentally, the
describe-function function itself is in `help.el'; it is
one of those long, but decipherable functions. Its definition
illustrates how to customize the
interactive expression without
using the standard character codes; and it shows how to create a
Other interesting source files include `paragraphs.el', `loaddefs.el', and `loadup.el'. The `paragraphs.el' file includes short, easily understood functions as well as longer ones. The `loaddefs.el' file contains the many standard autoloads and many keymaps. I have never looked at it all; only at parts. `loadup.el' is the file that loads the standard parts of Emacs; it tells you a great deal about how Emacs is built. (See section 'Building Emacs' in The GNU Emacs Lisp Reference Manual, for more about building.)
As I said, you have learned some nuts and bolts; however, and very
importantly, we have hardly touched major aspects of programming; I
have said nothing about how to sort information, except to use the
sort function; I have nothing about how to store
information, except to use variables and lists; I have said nothing
about how to write programs that write programs. These are topics for
another, and different kind of book, a different kind of learning.
What you have done is learn enough for much practical work with GNU Emacs. What you have done is get started. This is the end of a beginning.
Go to the previous, next section.