7. Frequently Asked Questions

A. Visit the file and hit C-x h to mark the whole
buffer. Then hit ESC C-\ to re-indent the entire region
which you've just marked. Or just enter M-x vhdl-indent-buffer.

Q.How do I re-indent the entire function?

A. Hit ESC C-h to mark the entire function. Then
hit ESC C-\ to re-indent the entire region which you've just
marked.

Q.How do I re-indent the current block?

A. First move to the brace which opens the block with
ESC C-u, then re-indent that expression with
ESC C-q.

Q.How do I re-indent the current statement?

A. First move to the beginning of the statement with
ESC a, then re-indent that expression with ESC
C-q.

Q.Why doesn't the RET key indent the line to
where the new text should go after inserting the newline?

A. Emacs' convention is that RET just adds a newline,
and that LFD adds a newline and indents it. You can make
RET do this too by adding this to your
vhdl-mode-hook (see the sample `.emacs' file
9. Sample `.emacs' file):

(define-key vhdl-mode-map "\C-m" 'newline-and-indent)

This is a very common question. :-) If you want this to be the
default behavior, don't lobby me, lobby RMS!

Q.I put (vhdl-set-offset 'statement-cont 0)
in my `.emacs' file but I get an error saying that
vhdl-set-offset's function definition is void.

A. This means that VHDL Mode wasn't loaded into your
Emacs session by the time the vhdl-set-offset call was reached,
mostly likely because VHDL Mode is being autoloaded. Instead
of putting the vhdl-set-offset line in your top-level
`.emacs' file, put it in your vhdl-mode-hook, or
simply add the following to the top of your `.emacs' file: