verilog-mode icon indicating copy to clipboard operation
verilog-mode copied to clipboard

Indenting/Highlighting user defined types

Open veripoolbot opened this issue 14 years ago • 2 comments


Author Name: Jonathan Greenlaw Original Redmine Issue: 308 from https://www.veripool.org Original Date: 2010-12-16


Indenting and highlighting does not recognize user defined types as specified by the verilog-typedef-regexp variable.

veripoolbot avatar Dec 16 '10 18:12 veripoolbot


Original Redmine Comment Author Name: Wilson Snyder (@wsnyder) Original Date: 2010-12-16T18:40:38Z


Thanks for filing.

veripoolbot avatar Dec 16 '10 18:12 veripoolbot


Original Redmine Comment Author Name: Michael McNamara Original Date: 2011-02-21T02:21:40Z


Hmm, this is way difficult. I like Wilson's idea of using verilog-typedef-regexp as the single way to tell emacs how to indent as well; but the problem is verilog-typedef-regexp is defined to match just a subset of the type, as for example if I use _t as a subscript for my types, as in: typedef reg[31:0] word_t; typedef reg[7:0] byte_t;

then I would (setq verilog-typedef-regexp "_t$")

Better for the indent part would be if I did (setq verilog-typedef-regexp "\sw+_t$") I.E. something that would match the entire "word_t" instead of just the "_t" part

veripoolbot avatar Feb 21 '11 02:02 veripoolbot