简体   繁体   中英

emacs verilog-mode local variables not parsed

I'm trying to set some Verilog-mode local variables in the SystemVerilog file itself such as:

// 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 --batch ./test.sv    -f verilog-batch-auto

But that tells me it cannot find module that is supposed to be in../../../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

(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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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