【发布时间】:2013-11-06 07:16:04
【问题描述】:
在 Elisp 中,我为特殊的自定义模式引入了一个变量,例如:
(defvar leo-special-var "")
(make-variable-buffer-local 'leo-special-var)
现在我在文件中设置这个变量,我使用以下行(在要编辑的文件中):
# Local Variables:
# leo-special-var: "-d http://www.google.com.au"
# End:
我想将此变量视为“对所有值都安全。这就是safe-local-variable-values 没有帮助的原因。相反,我尝试了(在 lisp 代码中 ):
# setting the symbol property of the variable
(put 'leo-special-var 'safe-local-variable 'booleanp)
但没有成功。设置符号属性时我做错了吗?还是有别的办法?
【问题讨论】: