简体   繁体   English

emacs verilog 模式局部变量未解析

[英]emacs verilog-mode local variables not parsed

I'm trying to set some Verilog-mode local variables in the SystemVerilog file itself such as:我正在尝试在 SystemVerilog 文件本身中设置一些 Verilog 模式局部变量,例如:

// Local Variables:
// verilog-library-flags:("-y ../../../ip_lib/")
// verilog-typedef-regexp: ".*_t$"
// verilog-auto-reg-input-assigned-ignore-regexp: ".*")
// End:

And then I call emacs in command line to generate the code:然后我在命令行中调用 emacs 来生成代码:

emacs --batch ./test.sv    -f verilog-batch-auto

But that tells me it cannot find module that is supposed to be in../../../ip_lib/但这告诉我它找不到应该在../../../ip_lib/ 中的模块

But then if I use:但是,如果我使用:

emacs -q   --eval='(progn (setq-default verilog-library-flags "-y ../../../ip_lib") (setq-default verilog-typedef-regexp ".*_t$"))' --batch ./test.sv    -f verilog-batch-auto

it works.有用。 What is the issue?问题是什么?

I don't use verilog, but glancing at your examples I can see that我不使用verilog,但看了你的例子我可以看到

(setq-default verilog-library-flags "-y ../../../ip_lib")

and

// verilog-library-flags:("-y ../../../ip_lib/")

are setting different types.正在设置不同的类型。 The former is a string value, while the latter is a list value (containing a single item, being a string).前者是一个字符串值,而后者是一个列表值(包含单个项目,是一个字符串)。

So that's presumably the issue.所以这大概就是问题所在。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM