Node:Void Variable, Previous:Void Function, Up:Variables
If you attempt to evaluate a symbol that does not have a value bound to
it, you will receive an error message. You can see this by
experimenting with our 2 plus 2 addition. In the following expression,
put your cursor right after the
+, before the first number 2,
type C-x C-e:
(+ 2 2)
In GNU Emacs 21, you will create a
*Backtrace* buffer that
---------- Buffer: *Backtrace* ---------- Debugger entered--Lisp error: (void-variable +) eval(+) eval-last-sexp-1(nil) eval-last-sexp(nil) call-interactively(eval-last-sexp) ---------- Buffer: *Backtrace* ----------
(As with the other times we entered the debugger, you can quit by
typing q in the
This backtrace is different from the very first error message we saw,
Debugger entered--Lisp error: (void-function this).
In this case, the function does not have a value as a variable; while
in the other error message, the function (the word `this') did not
have a definition.
In this experiment with the
+, what we did was cause the Lisp
interpreter to evaluate the
+ and look for the value of the
variable instead of the function definition. We did this by placing the
cursor right after the symbol rather than after the parenthesis of the
enclosing list as we did before. As a consequence, the Lisp interpreter
evaluated the preceding s-expression, which in this case was the
+ by itself.
+ does not have a value bound to it, just the function
definition, the error message reported that the symbol's value as a
variable was void.
In GNU Emacs version 20 and before, your error message will say:
Symbol's value as variable is void: +
The meaning is the same as in GNU Emacs 21.