verilog-auto-undef

verilog-auto-undef is a compiled Lisp function in `verilog-mode.el'.

(verilog-auto-undef)

Expand AUTOUNDEF statements, as part of M-x verilog-auto.
Take any `defines since the last AUTOUNDEF in the current file
and create `undefs for them. This is used to insure that
file-local defines do not pollute the global `define name space.

Limitations:
AUTOUNDEF presumes any identifier following `define is the
name of a define. Any `ifdefs are ignored.

AUTOUNDEF suppresses creating an `undef for any define that was
`undefed before the AUTOUNDEF. This may be used to work around
the ignoring of `ifdefs as shown below.

An example:

`define XX_FOO
`define M_BAR(x)
`define M_BAZ
...
`ifdef NEVER
`undef M_BAZ // Emacs will see this and not `undef M_BAZ
`endif
...
/*AUTOUNDEF*/

Typing M-x verilog-auto will make this into:

...
/*AUTOUNDEF*/
// Beginning of automatic undefs
`undef XX_FOO
`undef M_BAR
// End of automatics

You may also provide an optional regular expression, in which case only
defines the regular expression will be undefed.