> For the complete documentation index, see [llms.txt](https://emacs-lisp.ivory.cafe/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://emacs-lisp.ivory.cafe/bian-liang.md).

# 变量

- [12 变量](https://emacs-lisp.ivory.cafe/bian-liang/12-bian-liang.md)
- [12.1 全局变量](https://emacs-lisp.ivory.cafe/bian-liang/untitled.md): 无处不在的永恒变量
- [12.2 常量变量](https://emacs-lisp.ivory.cafe/bian-liang/chang-liang-bian-liang.md)
- [12.3 局部变量](https://emacs-lisp.ivory.cafe/bian-liang/ju-bu-bian-liang.md)
- [12.4 无效（Void）变量](https://emacs-lisp.ivory.cafe/bian-liang/que-shi-bian-liang.md)
- [12.5 定义全局变量](https://emacs-lisp.ivory.cafe/bian-liang/ding-yi-bian-liang.md)
- [12.6 定义变量的建议](https://emacs-lisp.ivory.cafe/bian-liang/ding-yi-bian-liang-de-xiao-tie-shi.md)
- [12.7 变量获取](https://emacs-lisp.ivory.cafe/bian-liang/untitled-1.md)
- [12.8 变量设置](https://emacs-lisp.ivory.cafe/bian-liang/untitled-2.md)
- [12.9 变量监视](https://emacs-lisp.ivory.cafe/bian-liang/untitled-3.md): 当一个变量发生变化时，出发一个函数
- [12.9.1 限制](https://emacs-lisp.ivory.cafe/bian-liang/untitled-3/12.9.1-xian-zhi.md)
- [12.10 变量作用域规则](https://emacs-lisp.ivory.cafe/bian-liang/untitled-1-1.md)
- [Untitled](https://emacs-lisp.ivory.cafe/bian-liang/untitled-1-1/untitled.md)
- [12.10.1 动态绑定](https://emacs-lisp.ivory.cafe/bian-liang/untitled-1-1/12.10.1-dong-tai-bang-ding.md)
- [12.10.2 动态绑定的建议](https://emacs-lisp.ivory.cafe/bian-liang/untitled-1-1/12.10.2-dong-tai-bang-ding-de-jian-yi.md)
- [12.10.3 词法绑定](https://emacs-lisp.ivory.cafe/bian-liang/untitled-1-1/12.10.3-ci-fa-bang-ding.md)
- [12.10.4 如何正确的使用词法绑定](https://emacs-lisp.ivory.cafe/bian-liang/untitled-1-1/12.10.4-ru-he-zheng-que-de-shi-yong-ci-fa-bang-ding.md)
- [文件变量](https://emacs-lisp.ivory.cafe/bian-liang/wen-jian-bian-liang.md)
- [目录变量](https://emacs-lisp.ivory.cafe/bian-liang/mu-lu-bian-liang.md)
- [通信变量](https://emacs-lisp.ivory.cafe/bian-liang/tong-xin-bian-liang.md)
- [变量别名](https://emacs-lisp.ivory.cafe/bian-liang/bian-liang-bie-ming.md)
- [变量限制](https://emacs-lisp.ivory.cafe/bian-liang/bian-liang-xian-zhi.md)
- [泛型变量](https://emacs-lisp.ivory.cafe/bian-liang/fan-xing-bian-liang.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
