Emacs 目录局部变量错误:类型参数stringp错误
我有以下文件。dir-locals.el:Emacs 目录局部变量错误:类型参数stringp错误,emacs,elisp,Emacs,Elisp,我有以下文件。dir-locals.el: ((c++-mode . ((irony-compile-flags-work-dir . "/home/aparulekar/Developer/GamePlay") (irony-compile-flags . (list "-Igameplay/src" "-Iexternal-deps/bullet/include"
((c++-mode . ((irony-compile-flags-work-dir . "/home/aparulekar/Developer/GamePlay")
(irony-compile-flags . (list "-Igameplay/src"
"-Iexternal-deps/bullet/include"
"-Iexternal-deps/oggvorbis/include"
"-Iexternal-deps/libpng/include"
"-Iexternal-deps/zlib/include"
"-Iexternal-deps/lua/include"
"-Iexternal-deps/glew/include")))))
当我访问该文件夹中的任何文件时,会出现以下错误:
Directory-local variables error: (wrong-type-argument stringp irony-compile-flags)
有人能告诉我为什么我不能给一个目录局部变量分配一个列表吗
(这是给你的)
编辑-,加上我有一些dir-local不安全变量相关抑制正在进行。
反讽编译标志
被定义为defcustom
格式的字符串列表(repeat string
)
在.dir locals.el
中,您忘记了提供的是值,而不是要计算的lisp表达式。因此,列表
符号是多余的,这就是打破类型检查的原因:您正在将反讽编译标志
设置为以符号列表
开头的列表。试试这个:
((c++-mode . ((irony-compile-flags-work-dir . "/home/aparulekar/Developer/GamePlay")
(irony-compile-flags . ("-Igameplay/src"
"-Iexternal-deps/bullet/include"
"-Iexternal-deps/oggvorbis/include"
"-Iexternal-deps/libpng/include"
"-Iexternal-deps/zlib/include"
"-Iexternal-deps/lua/include"
"-Iexternal-deps/glew/include")))))