Function: vhdl-template-block

vhdl-template-block is an interactive and byte-compiled function defined in vhdl-mode.el.gz.

Signature

(vhdl-template-block)

Documentation

Insert a block.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/vhdl-mode.el.gz
(defun vhdl-template-block ()
  "Insert a block."
  (interactive)
  (let ((margin (current-indentation))
	(start (point))
	label)
    (vhdl-insert-keyword ": BLOCK ")
    (goto-char start)
    (when (setq label (vhdl-template-field "label" nil t start (+ (point) 8)))
      (forward-word-strictly 1)
      (forward-char 1)
      (insert "(")
      (if (vhdl-template-field "[guard expression]" nil t)
	  (insert ")")
	(delete-char -2))
      (unless (vhdl-standard-p '87) (vhdl-insert-keyword " IS"))
      (insert "\n")
      (vhdl-template-begin-end "BLOCK" label margin)
      (vhdl-comment-block))))