4.3.3 File Styles

The Emacs manual describes how you can customize certain variables on a per-file basis by including a Local Variable block at the end of the file. So far, you’ve only seen a functional interface to VHDL Mode, which is highly inconvenient for use in a Local Variable block. VHDL Mode provides two variables that make it easier for you to customize your style on a per-file basis.

The variable vhdl-file-style can be set to a style name string as described in Built-in Styles. When the file is visited, VHDL Mode will automatically set the file’s style to this style using vhdl-set-style.

Another variable, vhdl-file-offsets, takes an association list similar to what is allowed in vhdl-offsets-alist. When the file is visited, VHDL Mode will automatically institute these offsets using vhdl-set-offset. See Customizing Indentation.

Note that file style settings (i.e., vhdl-file-style) are applied before file offset settings (i.e., vhdl-file-offsets).