如何在emacs中打印所有定义的变量? [英] How to print all the defined variables in emacs?
问题描述
要检查变量是否定义或不评估以下表达式,
(boundp'variable-name)Cx Ce将打印t如果变量名称为
目前尚不清楚您想要完整的符号列表,但由于 Mx
显示函数名称的方式有些专门。
假设您想以编程方式获取所有已定义符号的列表,请执行以下操作: auto-complete.el
>
(循环为x为符号
if(boundp x)
collect(symbol-name x))
请注意,您还可以输入 Mx describe-var RET
,然后按 TAB
获得所有符号的排序完成列表。
M-x < TAB > prints all the defined functions.
To check a variable is defined or not evaluating the following expression, (boundp 'variable-name) C-x C-e will print t if the variable-name is defined else nill.
How to print all the defined variables in emacs.
It's unclear exactly what you want to do with a full list of symbols, since the way in which M-x
displays function names is somewhat specialized.
Assuming that you want to programmatically obtain a list of all defined symbols, here's how auto-complete.el
does it:
(loop for x being the symbols
if (boundp x)
collect (symbol-name x))
Note that you can also enter M-x describe-var RET
, and then press TAB
to get a sorted completion list of all symbols.
这篇关于如何在emacs中打印所有定义的变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!