# 12.4 无效（Void）变量

当一个符号的 value 没有被指定任何值是，我们称其对应的变量是无效的。

在 Emacs Lisp 默认的动态绑定规则下，符号的 value 部分储存的值是对应变量当前绑定的值。不过需要注意的是，value 部分未被赋值的符号和 value 部分被赋值为 nil 的符号并不是等价的。符号 nil 是一个 Lisp 对象，而且和其他对象一样，都可以进行求值，但它仍然是一个值。如果一个变量时无效的，那么对它求值则会抛出一个 void-variable 错误，而不是返回一个值。

而在另一个规则——语法绑定规则下，value 部分仅储存对应变量的全局值，也就是任何此法绑定规则之外的值。当一个变量时语法绑定的时候，这个局部变量的值由语法环境决定。因此，这时，变量可以在其对应符号的 value 部分未被赋值的情况下拥有一个局部值。

TODO


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://emacs-lisp.ivory.cafe/bian-liang/que-shi-bian-liang.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
