Go to the previous, next section.

Generate an Error Message

Partly so you won't worry if you do it accidentally, we will now give a command to the Lisp interpreter that generates an error message. This is a harmless activity; and indeed, we will often try to generate error messages intentionally. Once you understand the jargon, error messages can be informative. Instead of being called "error" messages, they should be called "help" messages. They are like signposts to a traveller in a strange country; decyphering them can be hard, but once understood, they can point the way.

What we will do is evaluate a list that is not quoted and does not have a meaningful command as its first element. Here is a list almost exactly the same as the one we just used, but without the single-quote in front of it. Position the cursor right after it and type C-x C-e:

(this is an unquoted list)

This time, you will see the following appear in the echo area:

Symbol's function definition is void: this

(Also, your terminal may beep at you--some do, some don't; and others blink. This is just a device to get your attention.) The message goes away as soon as you type another key, even just to move the cursor.

Based on what we already know, we can almost read this error message. We know the meaning of the word `Symbol'. In this case, it refers to the first atom of the list, the word `this'. The word `function' was mentioned once before. It is a very important word. For our purposes, we can define it by saying that a function is a set of instructions to the computer that tell the computer to do something. (Technically, the symbol tells the computer where to find the instructions, but this is a complication we can ignore for the moment.)

Now we can begin to understand the error message: `Symbol's function definition is void: this'. The symbol (that is, the word `this') does not have a definition of any set of instructions for the computer to carry out.

The slightly odd wording of the message, `function definition is void', is designed to cover the way Emacs Lisp is implemented, which is that when the symbol does not have a function definition attached to it, the place that should contains the instructions is `void'.

On the other hand, since we were able to add 2 plus 2 successfully, by evaluating  (+ 2 2) , we can infer that the symbol  + must have a set of instructions for the computer to obey and those instructions must be to add the numbers that follow the  + .

Go to the previous, next section.