如何在emacs中打印所有定义的变量? [英] How to print all the defined variables in emacs?

查看:97
本文介绍了如何在emacs中打印所有定义的变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

M-x < TAB>打印所有定义的功能。

要检查变量是否定义或不评估以下表达式,
(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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆